03.12.2015 Views

laravel4cookbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

File-Based CMS<br />

October is a Laravel-based, pre-built CMS which was recently announced. I have yet to see the<br />

code powering what looks like a beautiful and efficient CMS system. So I thought I would try to<br />

implement some of the concepts presented in the introductory video as they illustrate valuable tips<br />

for working with Laravel.<br />

.<br />

The code for this chapter can be found at: https://github.com/formativ/tutorial-laravel-4-filebased-cms<br />

Installing Dependencies<br />

We’re developing a Laravel 4 application which has lots of server-side aspects; but there’s also an<br />

interactive interface. There be scripts!<br />

For this; we’re using Bootstrap and jQuery. Download Bootstrap at: http://getbootstrap.com/ and<br />

unpack it into your public folder. Where you put the individual files makes little difference, but I<br />

have put the scripts in public/js, the stylesheets in public/css and the fonts in public/fonts. Where<br />

you see those paths in my source code; you should substitute them with your own.<br />

Next up, download jQuery at: http://jquery.com/download and unpack it into your public folder.<br />

On the server-side, we’re going to be using Flysystem for reading and writing files. Add it to the<br />

Composer dependencies:<br />

1 "require" : {<br />

2 "laravel/framework" : "4.1.*",<br />

3 "league/flysystem" : "0.2.*"<br />

4 },<br />

.<br />

This was extracted from composer.json.<br />

Follow that up with:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!