Since i hear a lot of people asking me how they would build a CMS from scratch with the Laravel 5 structure lets dive in and lets create our own very basic CMS. In my case to use it as a blog system so I can use it for this very blog! I will call it Blimp! Just because a blimp is more awesome than an airplane.


Lets start fresh!

So lets start with this!! Lets create a new project by using the laravel installer (if you are not familiar with the installer check out the docs) Open your terminal and create your project laravel new blimp and you should get some output like this

Crafting application…  
Application ready! Build something amazing.  

next lets go into the project with cd blimp and name our namespaces to our project name. Since I will be making blimp I will type the following: php artisan app:name blimp. Next let us set up our local environment file type in the terminal:
mv .env.example .env and let us set a key to generate our hashes run php artisan key:generate and you should get the following message:

Application key [j9ti41TbwqdmJef7ReAL2dcaYpqa6zn8] set successfully.  

Awesome almost there! Since the key will generate its value to config/app.html"/content/images/2015/02/step-1.png" alt="step-1" />

Exploring the package structure

Basically you could use ANY structure your would want since there is no predefined structure and you could create any folder and use any file. It al depends on how you use the files once they are autoloaded. BUT!!!! I personally like to keep a more logical way when using a framework. In this case lets take a look at the Laravel/socialite package you could use to authenticate users into your application with twitter, Facebook, twitter, github and there will be new more while the package grows. This package is provided by Laravel, to check how Taylor himself sees a structure as package and let us also take a look at the CMS subsplit of the octobercms lets look at the repo’s directory structure.





Let that sink in a bit! And in the next part lets create our basic package setup and directory so we can start creating our awesomeness!!

SEE you next time!


© 2015. All Rights Reserve John in 't Hout.