App::error(function($exception, $code)
{
switch ($code)
{
case 403:
return Response::view(‘errors.403‘, array(), 403);
case 404:
return Response::view(‘errors.404‘, array(), 404);
case 500:
return Response::view(‘errors.500‘, array(), 500);
default:
return Response::view(‘errors.default‘, array(), $code);
}
});
Laravel 4 Quick Tip: Custom Error Pages
原文地址:http://www.cnblogs.com/steven9801/p/3990589.html