Created
March 28, 2014 07:23
-
-
Save gravitano/9827152 to your computer and use it in GitHub Desktop.
404 Error Handling on Laravel 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| App::missing(function() | |
| { | |
| if(Request::ajax()) | |
| { | |
| return Response::json([ | |
| 'code' => 404, | |
| 'message' => 'Sorry, that page does not exists.' | |
| ], 404); | |
| } | |
| return Response::view('404', [], 404); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment