diff --git a/laravel/laravel.php b/laravel/laravel.php index 0d9253a1..afcd47d1 100644 --- a/laravel/laravel.php +++ b/laravel/laravel.php @@ -161,15 +161,18 @@ Request::$route = Routing\Router::route(Request::method(), URI::current()); -if ( ! is_null(Request::$route)) -{ - $response = Request::$route->call(); -} -else +if (is_null(Request::$route)) { + Request::$route = new Routing\Route('GET /404', array(function() + { + return Response::error('404'); + })); + $response = Response::error('404'); } +$response = Request::$route->call(); + /** * Close the session and write the active payload to persistent * storage. The session cookie will also be written and if the