File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ |--------------------------------------------------------------------------
5+ | Application & Route Filters
6+ |--------------------------------------------------------------------------
7+ |
8+ | Below you will find the "before" and "after" events for the application
9+ | which may be used to do any work before or after a request into your
10+ | application. Here you may also register your custom route filters.
11+ |
12+ */
13+
14+ App::before (function ($ request )
15+ {
16+ // Fired before all requests to the application...
17+ });
18+
19+
20+ App::after (function ($ request , $ response )
21+ {
22+ // Fired after all requests to the application...
23+ });
Original file line number Diff line number Diff line change 1414Route::get ('/ ' , function ()
1515{
1616 return View::make ('hello ' );
17- });
18-
19- /*
20- |--------------------------------------------------------------------------
21- | Application & Route Filters
22- |--------------------------------------------------------------------------
23- |
24- | Below you will find the "before" and "after" events for the application
25- | which may be used to do any work before or after a request into your
26- | application. Here you may also register your custom route filters.
27- |
28- */
29-
30- App::before (function ($ request )
31- {
32- // Fired before all requests to the application...
33- });
34-
35-
36- App::after (function ($ request , $ response )
37- {
38- // Fired after all requests to the application...
3917});
Original file line number Diff line number Diff line change 2929App::error (function (Exception $ exception , $ code )
3030{
3131 Log::error ($ exception );
32- });
32+ });
33+
34+ /*
35+ |--------------------------------------------------------------------------
36+ | Require The Filters File
37+ |--------------------------------------------------------------------------
38+ |
39+ | Next we will load the filters file for the application. This gives us
40+ | a nice separate location to store our route and application filter
41+ | definitions instead of putting them all in the main routes file.
42+ |
43+ */
44+
45+ require __DIR__ .'/../filters.php ' ;
You can’t perform that action at this time.
0 commit comments