问题
I am new to laravel and I am confused which environment I will used to create an app w/ db integration (MYSQL).
- Wamp (Localhost)
- PHP artisan
- Homestead
What are the pro/cons of each environment? thanks
回答1:
Although this question is opinion based, my answer will be based on my experience.
WAMP (Localhost) Wamp is short for Window Apache Mysql PHP
Pros: - Wamp can easily be setup on windows by installing Wamp server, EasyPHP e.t.c
Can easily be configured
Comes with PHPMyAdmin for quick Mysql database administration
Cons:
Setting up Laravel in Wamp is a big pain as it involves advance configuration else you end up with URL e.g http://localhost/project/public
I have tried installing Memcached without success on Wamp; which is a good caching server for PHP/Laravel
PHP Artisan
Pros:
- Easy to use
- clean URL without /public
Cons:
- You still have to install PHP and Mysql to make it work
- Should be used for small Laravel project
- some other limitations
Homestead
This is the preferred development environment for Laravel
Pros:
- Installs everything you need to start developing Laravel app
- share a folder between your host
- can easily be rebuilt
Cons:
- I noticed each time shutdown my host system without properly saving homestead, I have to provision homestead each time to make it work which atimes requires internet connection
- there are some issues peculiar to Homestead that doesn't have specific solution you have to try a lot of things to resolve issue.
- Homestead seems to be slow atimes
LNMP
Linux (Ubuntu) Nginx Mysql PHP and virtualbox
This is my best development environment. It takes minimum Linux experience to make this work but once achieved you will enjoy it.
Pros:
- fully customize and install anything you want such memcached, gulp, Mysql , PHP. Git, Just anything
- broaden your experience as a programmer do things yourself like system admin
- It hardly crash unlike homestead. You can always take snapshots in virtualbox
- easily move to a new system by coping virtual hard disk to another virtualbox
Cons:
- requires more effort to setup
- you need to have little Linux experience
These are just few of my experience which my answer is based upon.
来源:https://stackoverflow.com/questions/34868575/localhost-php-artisan-serve-and-homestead-pro-cons