Tweet about this on TwitterShare on FacebookShare on Google+Share on StumbleUponShare on TumblrShare on RedditPin on PinterestEmail this to someone
Now we need to install Laravel PHP framework into our web folder as the web application will be implemented using Laravel.

Step 1 – Download Latavel

Go to this link (www.laravel.com ) and download the latest Laravel framework.

Unzip its contents and copy into the web folder, your lbc folder should have following folder structure.

Laravel Source Folder

Laravel Source Folder

Laravel Framework Files and Folders

Laravel Framework Files and Folders

Step 2 – Setting Folder Permissions

According to Laravel documentation we need to give write permission to storage folder, as Apache needs to write data into this. Issue following command here, if needed we can give permission only to Apache process. Go to lbc folder then type this command.

chmod –R 777 storage

Step 3 – Verify Laravel Installation

A sip of Coffee with Laravel and Backbone - Book

 

Now if you navigate to http://lbc.dev/public, you will see laravel has setup correctly and it shows the  Laravel welcome screen. But we don’t need anyone  to type public folder in the url specifically, moreover we don’t need them to access other folders by visiting root url. This mean we need to change our virtual host path point to public folder, not to the lbc folder.

Issue following command in terminal and edit default file once again as we did before.

sudo gedit /etc/apache2/sites-available/default

and then change DocumentRoot value to /home/[YOU]/lbc/public

Restart Apache and now try to access http://lbc.dev you should see Laravel front page.

Laravel Front Page

Laravel Front Page

Posts of this series
Laravel, Backbone.js + Coffeescript Tutorial Part I – Introduction
Laravel, Backbone.js + Coffeescript Tutorial Part II – Setup
Laravel, Backbone.js + Coffeescript Tutorial Part III – Install Laravel
Laravel, Backbone.js + Coffeescript Tutorial Part IV – Database
Laravel, Backbone.js + Coffeescript Tutorial Part V – Data model
Laravel, Backbone.js + Coffeescript Tutorial Part VI – REST API
Laravel, Backbone.js + Coffeescript Tutorial Part VII – REST API
Laravel, Backbone.js + Coffeescript Tutorial Part VIII – Views
Laravel, Backbone.js + Coffeescript Tutorial Part IX – Coffeescript
Laravel, Backbone.js + Coffeescript Tutorial Part X – Backbone
Laravel, Backbone.js + Coffeescript Tutorial Part XI – Backbone
Laravel, Backbone.js + Coffeescript Tutorial Part XII – Backbone
Laravel, Backbone.js + Coffeescript Tutorial Part XIII – Backbone

Tweet about this on TwitterShare on FacebookShare on Google+Share on StumbleUponShare on TumblrShare on RedditPin on PinterestEmail this to someone