Helper Helper - 1 year ago 117
PHP Question

404 Error Handling in Laravel 5.2.15

I am asking this question because I did not get reply after adding my comment in this question

laravel routing and 404 error

In the above answer, we can see below code to be used in


return Response::view('errors.missing', array(), 404);

But, I think we don't have
in latest version. Can somebody suggest better way to handle 404 error?

Answer Source

You don't need to do that anymore. Don't include that. What you do is put a view file (your 404 error view) called 404.blade.php in your resources/views/errors folder and Laravel will handle 404 errors for you.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download