1) Install Composer
If you do not already have a composer installed, you will need to do this. You can check the weather you created the composer by simply typing the composer command in the mac terminal . You should see a list of available commands if composer is installed.

If you donβt have a composer yet, you can see Getting started with Composer
2) Install Laravel
Laravel has good documentation on installing Laravel . I will go exactly what steps I took to launch Laravel on OSX Yosemite.
Install through the Laravel installer. Enter the following into the terminal.
cd ~/ composer global require "laravel/installer=~1.1"
Add the composer executable to the Path environment so that you can find the laravel .
PATH=$PATH:~/.composer/vendor/bin
Install a new Laravel instance and give it a name. In our case, we will call the saas project.
laravel new saas
I use MAMP PRO to run sites locally on my mac. So I just need to create a new host in MAMP and point it to the saas / public directory.

Then, visiting http: // saas: 8888 , you will see a beautiful Laravel welcome screen.

3) Create a database
I like to use Navicat to manage my databases. With Navicat for MySQL, I create a new local database.
Then define this connection in the .env file.
DB_HOST=localhost DB_DATABASE=saas DB_USERNAME=root DB_PASSWORD=xxxxxxx
Start the migration with the following command:
php artisan migrate
Since I use MAMP, I got this error while trying to migrate.
[PDOException]
SQLSTATE [HY000] [2002] There is no such file or directory
The solution was to add the unix_socket key with the value of the path where mysql.sock is in MAMP .
'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, 'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock', ],
4) Wrap-UP
The directories in the repository and the bootstrap / cache directories must be writable. We will do this with the following:
chmod -R 777 storage chmod -R 777 bootstrap/cache
Rename the environment file.
mv .env.example .env
5) PHP path
Since we used MAMP, we have several versions of PHP installed on our machine. Therefore, if we try to run php artisan , we will be given an error.
Mcrypt PHP extension required
If you also get this error, first check which version of PHP you are using with MAMP. You can check this through the main MAMP> PHP window. In my case, they used version 5.6.10 .
Then we can edit our ~/.bash_profile file by adding the following line:
export PATH=/Applications/MAMP/bin/php/php5.6.10/bin:$PATH
Reboot the terminal and then you can run the php artisan command.
What is it. Create something awesome!