Configure The Laravel 5 in Mac OS X in Website

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”.

    command1

  • 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”

    composer-phar1

  • Now type “composer” in your terminal. It show you a list of commands available with composer.

    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.

    go-to-folder

  • 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)”

    bash-profile

  • 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.
    project-name
  • Now go inside this project directory and start laravel server by giving “php artisan serve”.
    php-artisan-serve
  • Now in browser type “localhost:8000”
    laravel-5

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.

Leave a Reply