Laravel 10 - How to Customize Default Error Pages
Hello Artisan, today I'll show you how to customize default error pages in our Laravel app. We always want to design our webpage as unique as others and to match the design we always want to design everything related to our web page. And for that, we need to design our error pages also. So, let's see how we can design our error pages easily.
Note: Tested on Laravel 10.0
- Publish Default Error Pages
- Customize Error Page
First, we've to publish the default error pages. For that, we need to fire the below command in our terminal.
It'll generate all the pages under resources/view/errors.
As an example, we'll customize our 404 page. For that, we need to open 404.blade.php
After editing we got to any route that does not exist e.g. localhost:8000/index, we can see the below 404 page
And following this step we can customize any error pages we want.
0 Comments
CAN FEEDBACK
Emoji