Check the Laravel install docs for current info.
Laravel recommends using its installer package, which you need to install first via Composer.
~/.composer/vendor/bin directory must be in your shell’s
PATH for the
laravel executable to work. Edit your shell config:
nano ~/.bash_profile # Add this line export PATH="~/.composer/vendor/bin:$PATH"
nano ~/.zshrc # Add this line export PATH="$HOME/.composer/vendor/bin:$PATH"
ZSH cannot use
~ to refer to the home directory. You have to use
$HOME for whatever hacker-crap reason.
Don’t forget to restart the shell after saving.
Do the installation using the Laravel installer or composer.
Configure environment file
- Duplicate the file
.env.exampleand rename to
- Set the required config values.
Set application key
Create an application key (if you cloned a Git repo to install):
php artisan key:generate
Run database migrations
php artisan migrate
Run database seeds
php artisan db:seed