refactoring the filters.
This commit is contained in:
parent
6048d20921
commit
2c108a9188
|
|
@ -50,28 +50,19 @@
|
||||||
|
|
||||||
'after' => function($response)
|
'after' => function($response)
|
||||||
{
|
{
|
||||||
if (Config::get('session.driver') !== '')
|
if (Config::get('session.driver') !== '') Input::flash();
|
||||||
{
|
|
||||||
Input::flash();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
'auth' => function()
|
'auth' => function()
|
||||||
{
|
{
|
||||||
if ( ! Auth::check())
|
if ( ! Auth::check()) return Redirect::to_login();
|
||||||
{
|
|
||||||
return Redirect::to_login();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
'csrf' => function()
|
'csrf' => function()
|
||||||
{
|
{
|
||||||
if (Input::get('csrf_token') !== Form::raw_token())
|
if (Input::get('csrf_token') !== Form::raw_token()) return Response::error('500');
|
||||||
{
|
|
||||||
return Response::error('500');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
);
|
);
|
||||||
Loading…
Reference in New Issue