Step 1 Installing Composer
- First, you need composer (which is Dependency Manager ). So, open your terminal and write following command: “curl -sS https://getcomposer.org/installer | php”.
- Now you have the “composer.phar” file (in future you will have to need run composer command). So move your composer.phar file to system by giving following command : “sudo mv composer.phar /usr/local/bin/composer”
- Now type “composer” in your terminal. It show you a list of commands available with composer.
Step 2 Installing Mcrypt Extension
- Download Mcrypt extension from http://php.net/manual/en/mcrypt.setup.php. and extract it. Now rename this folder by “php5” and copy it.
- Make right click on finder and select “ Go to folder”. Type “/usr” and press enter.
- Select “local” directory and paste this copied folder inside “local” directory.
- Now you have to edit “.bash_profile” file (It will be in hidden mode, so first you have to provide “defaults write com.apple.finder AppleShowAllFiles YES” command in terminal so it will show you every hidden files then reopen your finder).
- Now open “.bash_profile” from “users/(Mac Current User)”
- Paste “export PATH=/usr/local/php5/bin:$PATH” in this file and save it.
Step 3 Final Step
- In terminal, type “composer create-project laravel/laravel (project name) –prefer-dist”. It will download whole laravel 5 project for you.
- Now go inside this project directory and start laravel server by giving “php artisan serve”.
- Now in browser type “localhost:8000”
I hope this blog post will help you to Configure Laravel 5 in Mac OS X in Web. Let me know in comment if you have any questions regarding Web. I will reply you ASAP.