Skip to content

Commit a147339

Browse files
committed
Make a filters file by default.
1 parent b54ea44 commit a147339

3 files changed

Lines changed: 37 additions & 23 deletions

File tree

app/filters.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
});

app/routes.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,4 @@
1414
Route::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
});

app/start/production.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,17 @@
2929
App::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';

0 commit comments

Comments
 (0)