Hello Developers, It is most important to know how to add custom error page in our project. It’s most important when we are working in mind set of good SEO score.
In laravel9, if we want to set custom ERROR page that is much more simple to older version of laravel.
We will do this is steps.
Step 1. Run a console command
Open terminal or Command and if you are using VS Code open and type below code.
$ php artisan vendor:publish --tag=laravel-errors
Step 2. Update View File
You will see a new directory is added inside resources/views/ with the name of “errors”.
Inside there is multiple error files. Check below image
Now open the file and Change with your design.
Note- If your are working on SharedHosting then, Just do this task on local then upload to error view files on resources/views/ , and update with your design.
Step 3. Test and Final Output.
As expected you will get the output like me.
Without the above Process .
After i completed the above task and added my new design.
Thanks and Happy Coding.