Skip to content

Instantly share code, notes, and snippets.

@patrickmaciel
Created November 20, 2014 11:24
Show Gist options
  • Save patrickmaciel/294c6f42f395752f161c to your computer and use it in GitHub Desktop.
Save patrickmaciel/294c6f42f395752f161c to your computer and use it in GitHub Desktop.
Laravel 4.2 filters for: missing route/page and exception
<?php
// 404
App::missing(function($exception)
{
if (!Config::get('app.debug')) {
return Response::view('errors.missing', array(), 404);
}
});
App::error(function(Exception $exception)
{
if (!Config::get('app.debug')) {
return Response::view('errors.fatal_error', array(), 404);
}
// Log::error($exception);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment