App::error(function (Exception $exception, $code) { Log::error($exception); }); App::error(function (Illuminate\Session\TokenMismatchException $exception) { return Response::make("CSRF error.", 500); }); /* |-------------------------------------------------------------------------- | Maintenance Mode Handler |-------------------------------------------------------------------------- | | The "down" Artisan command gives you the ability to put an application | into maintenance mode. Here, you will define what is displayed back | to the user if maintenance mode is in effect for the application. | */ App::down(function () { return DebugHelpers::generateMaintenanceModeResponse(); }); /* |-------------------------------------------------------------------------- | Require The Filters File |-------------------------------------------------------------------------- | | Next we will load the filters file for the application. This gives us | a nice separate location to store our route and application filter | definitions instead of putting them all in the main routes file. | */ require app_path() . '/filters.php'; require app_path() . '/events.php';