I'm trying to use the default event listener in Laravel for errors (i.e. 404).
I have the following code:
Event::listen('404', function()
{
return Controller::call('errors@404');
});
This works fine (it calls the error controller's 404 action) if the URL doesn't exist (i.e. doesn't hit a controller). But when the path hits a controller, then it seems to ignore that event listener.
Do I need to do something to tell it to use that listener?