There are more than 40 PHP frameworks available. The popular frameworks are Cakephp, Zend, Symfony, Codeigniter, Yii etc. In recent times Laravel got very popular among web developers. Currently, Laravel is one of the top PHP frameworks for modern web development.
Laravel did major changes in its Application structure from 4.x to 5.x.
Laravel 5.x Application structure
App directory only contain application core code. App directory contains directories such as console , http , providers.
- The Console directory contains all of the custom Artisan commands for your application.
- The Http directory conatins code to handle request entering your application.It conatins controllers, middleware, and form requests.
– Filters for authentication in laravel 4.x have been converted to middleware , if you want to use filter you can still use in laravel 5.x.
The old app/models directory has been removed but if you want to use it you can implement.
You can also create other directories and classes as per your requirement inside app directory to extend your application.
Config directory contains all configuration file of application.
Database directory contains your database migration and seeds.
Resources directory contains all your appliactions views , assest and language files.
Storage directory contains compiled blade templates, file based cache , logs etc.
Why Laravel 5.x changed Application structure?
New structure help developers to easily understand and work with framework , as you can see its follows \”best practice\” that development community follow.
It also implemented advanced objected oriented features like name spacing etc.
New route:cache Artisan command to speed up the registration of your application routes.
Most important key point is Laravel 5.1 and above version is compatible with PHP7.
Update: Also read Read how to upgrade Laravel 4.2 to 5.0 and above version