Laravel 8 Create Custom Error Page

By : phpicoder Created : February 22, 2021

Hello guys, In this tutorial, we will learn how to create custom error page in laravel 8 web applications. We will learn how to create a custom error page in Leravel 8. This article will give you a simple example of how to create a 404 error page in Laravel 8. In this article, we will implement a how to set 404 error page in laravel 8.

404 Page View

laravel 8 custom error page

If an error occurs in Laravel, a default default page is displayed. But if you want to create your own custom error page if yes you are in the right place

Create View file

Now go to resources/views/ folder and then create new folder name errors and then go to errors folder and need to create blade file like as bellow 

  • 404.blade.php
  • 405.blade.php

 Edit 404.blade.php

open 404.blade.php file and edit below code

<!DOCTYPE html>
	<title>Custom Error Page -</title>
	<link rel="stylesheet" href="">
  <div class="container">
    <div class="row text-center">
      <div class="col-md-6 offset-md-3 error-div">    
          <div class="jumbotron">
            <h6>Page not found -</h6>

Run Laravel App

Start the laravel application with following command: 

php artisan serve

After run above command you click this url

I hope it can help you for ustom error page in laravel 8 tutorial.....