Laravel 6 , Laravel , Laravel 7 , Laravel 8
Today,I will learn you how create Custom Error Page in laravel 8. we will show example of laravel 8 custom error page example . you will learn how to create custom error page in laravel 8. you will learn how to create 404 error page in laravel 8. we will help you to give example of how to set 404 error page in laravel 8. if you want to see example of laravel 8 custom 404 page then you are a right place. Let's get started with laravel 8 new error page example.
You need to create blade file like 404.blade.php, 405.blade.php etc on errors(resources/view.errors) directory in laravel 8. you can see i created 404 blade file and check it on your project.
Almost we are using theme for front-end or backend side and we always looking for set 404, 500 or 505 error page design from there that we used for project. So it is a very simple and easy way to create custom 404 page in laravel 8 project. i added below screen shot of laravel 8 error page design.
Now you have to just create "errors" folder in your resources directory and then after you need to create 404.blade.file inside that folder. So, basically laravel 8 will stetted default design, but if you created 404 file into "errors" directory then it will take from there.
So, you just need to create 404 blade file and put your own code like i added then you can simply check it out.
<title>Custom Error Page</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" ></script>
<div class="row text-center">
<div class="col-md-6 offset-md-3 error-div">
<h6>Page not found - Nicesnippets.com</h6>
After you can simply run your application by following command:
php artisan serve
Now you can open following url and you will see error page as above:
Now you can simply check it out.
I will help you...