How can I pass a variable that is processed in the filter back to route for later usage?
Example:
Filter:
Route::filter('myfilter', function()
{
return "some data";
});
Route:
Route::get('/mypage', array('before'=>'myfilter', function($filter) {
if($filter!= 'admin') {
return Redirect::to('home');
}
}));
The above example doesn't work. How can I make it works?
Thank you.