how i can call filter in filter using laravel?
i have this filter:
Route::filter('auth', function()
{
if (Auth::guest())
{
if (Request::ajax())
{
return Response::make('Unauthorized', 401);
}
else
{
return Redirect::guest('login');
}
}
});
now i create another filter called admin and i want call auth filter in this:
Route::filter('admin', function(){
#call auth filter
#code
});
it's possible do that?