Laravel framework 5.0 article

Home >> Laravel framework 5.0 >>

  Laravel 5 application structure

This Article will explain you about Laravel 5.0 Application Structure. Laravel 5 application lives in the App directory. By default, this directory is namespaced under App and is autoloaded by Composer.

After the installation if you see root folder of Laravel 5.0 application, it will look like below image.

Let me explain Application Structure in detail.

app directory

  • Commands represent jobs that can be queued by your application, as well as tasks that you can run synchronously within the current request lifecycle.
  • Console directory contains all of your Artisan commands.
  • Events may be used to alert other parts of your application that a given action has occurred, providing a great deal of flexibility and decoupling.
  • Exceptions directory contains your application's exception handler and is also a good place to stick any exceptions thrown by your application.
  • Handlers directory contains the handler classes for both commands and events. Handlers receive a command or event and perform logic in response to that command or event being fired.
  • Http directory contains your controllers, middleware, and requests.
  • Services directory contains various "helper" services your application needs to function.

bootstrap directory

  • bootstrap folder contains a few files that bootstrap the framework and configure autoloading, as well as a cache folder that contains a few framework generated files for bootstrap performance optimization.

config directory

  • config directory, contains all of your application's configuration files.

database directory

  • database folder contains your database migration and seeds.

public directory

  • public directory contains the images, JavaScript, CSS, etc.

resources directory

  • resources directory contains your views, raw assets and localization files.

storage directory

  • storage directory contains compiled blade templates, file based sessions, file caches, and other files generated by the framework.

Storage Folder contains app, framework, and logs directories. 

  • app directory may be used to store any files utilized by your application. 
  • framework directory is used to store framework generated files and caches.
  • logs directory contains your application's log files.

tests directory

  • tests directory contains your automated tests. An example PHPUnit is provided out of the box.

vendor directory

  • vendor directory contains your composer dependencies.

You can check application structure in more details on laravel official site

Write your comment now