Frank Waive

Webdesigner in Warri Nigeria

  • Frank Waive
  • About me
  • What i’ve done
  • Blog
  • Contact Me
  • Request Quote

Archives for August 2015

How to Install Laravel on a MAC with XAMPP

August 4, 2015 by frankwaive 52 Comments

If you’re reading this, chances are you are already in love with laravel, you probably have seen a couple of advantages laravel has over other frameworks, seen a tutorial video or read an article that has sparked your interest in laravel. However, loving laravel is one thing, installing it is another.

I personally got acquainted with laravel just before version 5 was released, but somehow I kept postponing diving into it, sadly, at the time I decided to, laravel 5 had been released and most of the instructions I found online for installation where either for a none XAMPP user or for version 4 for a XAMPP user and this was a pain!

So you don’t go spend so much time looking for a solution like I did, I’ve decided to be your knight in shinny armor, here’s how to install Laravel 5 on XAMMP for Mac OS X.

Requirements

      Terminal

 

    XAMPP

OSX by default has PHP pre-installed, so when you install XAMPP, you’ll actually be installing a second PHP version on your MAC. Your Computer decides which to use depending on if internet sharing is on (System preferences/sharing) or if xampp server is on and apache is started. To know which version of PHP you system is using by default, open terminal, run “which php” without the quotes.

If what you get IS NOT “/Applications/XAMPP/xamppfiles/bin/php”, here’s how to correct it

Create a file called .bash_profile on your home directory (if you don’t have this file already) from terminal, to do this run the following commands one line at a time

Cd /

Sudo nano .bash_profile

Then add this to the file:

export XAMPP_HOME=/Applications/XAMPP
export PATH=${XAMPP_HOME}/bin:${PATH}
export PATH

Then hold “Control X” when prompted to save type y and press enter
Then quit and relaunch Terminal.app.
To confirm if this has worked, run “which php” from terminal without the quotes, you should get this “/Applications/XAMPP/xamppfiles/bin/php”

Next step is to install composer, to do this, navigate to your XAMPP public folder from terminal (htdocs), to do this, type

cd /Applications/XAMPP/htdocs

to confirm you’re in the right place, type “ls” and hit enter without the quotes, compare the directory listing with the contents of the actual htdocs folder from finder, if they are the same, you’re on track.

To download and install composer type
“curl -s http://getcomposer.org/installer | php”
and hit enter without the quotes, composer will download and install

Now you can install laravel, to do this type the following without the quotes and hit enter

“composer create-project laravel/laravel --prefer-dist”

This will download and install the latest version of laravel on your htdocs folder, however, if you visit http://localhost/laravel/public you’ll find a blank screen, don’t panic, its just a folder permission issue. To fix this, in terminal type the following and hit enter

Cd /Applications/XAMPP/htdocs/laravel

After that, type the following ad hit enter

sudo chmod -R 7777 storage

try opening http://localhost/laravel/public again, you should now see the default laravel page.
How to install laravel on mac ox x with xampp

If this didn’t work for you, leave a comment and I’ll get back to you as soon as I can!

Filed Under: Tutorials Tagged With: How to Install Laravel, How to Install Laravel 5, How to Install Laravel on a MAC, How to Install Laravel on a MAC XAMPP, How to Install Laravel XAMPP, Install Laravel 5 OSX, Install Laravel OSx, Install Laravel OSX Xampp

Archives

  • May 2020
  • September 2015
  • August 2015
  • July 2015
  • January 2015
  • December 2013
  • October 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Web Designer in Nigeria. Copyright ©    Frank Waive    Webdesigner in Warri Nigeria.

Copyright © 2021 · Frank Waive 4.1 on Genesis Framework · WordPress · Log in