Reputation:
whenever error goes the default error page is seen like
Sorry, the page you are looking for could not be found.
1/1
NotFoundHttpException in RouteCollection.php line 143:
in RouteCollection.php line 143
at RouteCollection->match(object(Request)) in Router.php line 746
at Router->findRoute(object(Request)) in Router.php line 655
at Router->dispatchToRoute(object(Request)) in Router.php line 631
at Router->dispatch(object(Request)) in Kernel.php line 229
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in VerifyCsrfToken.php line 50
at VerifyCsrfToken->handle(object(Request), object(Closure))
and i need to define my custom error page like sorry page not found with some nice design
Upvotes: 1
Views: 151
Reputation: 5939
When you turn off debugging of the application, you will get a semi-nice error page and the error won't be shown.
To create custom views for errors, you only need to create files resources/views/errors/ERRORCODE.blade.php
(replace ERRORCODE with 404, 403 etc).
There's some information in their documentation: http://laravel.com/docs/5.1/errors#custom-http-error-pages
And some more information by Matt Stauffer: https://mattstauffer.co/blog/laravel-5.0-custom-error-pages
Upvotes: 1
Reputation: 2469
Actually i think you should better consult more on laravel guides before starting http://laravel.com/docs/5.1/errors
on "Custom HTTP Error Pages"
basically on your resource folder you can find error folder under that folder save 404.blade.php with the custom design and error message.
Upvotes: 0