Quick View of the Laravel 4.1 Workflow
Here is a quick view of the Laravel 4.1 workflow when a request is made. It’s probably out of date now.
File: public/index.php
- call composer autoloader (START OF APPLICATION)
- call $app = require(bootstrap/start.php)
- call $app->run():
- Get request
- Get response from handled request
- Send response
- Terminate stack (END OF APPLICATION)
File: bootstrap/start.php
- create $app
- detect environment
- store array of paths
- call Illuminate/Foundation/start.php
- return $app
File: Illuminate/Foundation/start.php
- turn off PHP error reporting(-1)
- check for mcrypt extension or die
- use 5 namespaces (Request, Facade, AliasLoader, EnvironmentVariables, Repository)
- bind $app (self) to container for use a facade
- if unit testing, bind env to test environment
- clear all facade instances
- set $app as facade application
- register core container aliases (for dependency injection)
- store $_ENV and $_SERVER variables
- bind config repository to container
- register exception handling
- if not testing, turn of display_errors
- set the default timezone
- register the alias loader
- enable HTTP request method override (for PUT and DELETE)
- Register the core service providers (session, caching, encryption, etc)
- once application is booted, call closure:
- require app/start/global.php (Class Loader, Error logger file, error handler, maintenance mode, app filters)
- require app/start/{$env}.php (empty)
- require app/routes.php (application routes)