i am new to laravel and trying to play with different aspects of this framework.Currently i am working with route::filters and wrote a simple code to see how filters works.But i am getting the following error:
BadMethodCallException in Macroable.php line 81: Method filter does not exist.
why is this error thrown ?how i can solve this issue? Here is my code in route.php :
Route::filter('birthday', function()
{
if (true) {
return View::make('birthday');
}
});
Route::get('/', array(
'before' => 'birthday',
function()
{
return View::make('welcome');
}
));