Install

Prerequisites

Check the Laravel install docs for current info.

Installer tool

Laravel recommends using its installer package, which you need to install first via Composer.

The ~/.composer/vendor/bin directory must be in your shell’s PATH for the laravel executable to work. Edit your shell config:

Using Bash

nano ~/.bash_profile

# Add this line
export PATH="~/.composer/vendor/bin:$PATH"

Using ZSH

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.

Reference

Install Laravel

Do the installation using the Laravel installer or composer.

Configure environment file

  1. Duplicate the file .env.example and rename to .env.
  2. Set the required config values.

Set application key

Create an application key (if you cloned a Git repo to install):

php artisan key:generate

Update packages

composer install

Run database migrations

php artisan migrate

Run database seeds

php artisan db:seed