Creating Custom HTTP Error Pages (404, 500) in Laravel 5.5

With Laravel 5.5 It is extreemly easy to create custom Error Pages.

For example if you wish to customize your 404 Status Code Error Page.

Create a new file resources / views / errors / 404.blade.php

This file will be used to serve all the not found pages in your application.

Livewire Component Library
<h2>Not Found !!</h2>

<p>Sorry The Page you are looking for does not exist in this application.</p>


Host Laravel Application on DigitalOcean

Use coupon 5balloons on this Cloudways Affiliate URL to get special discount.
Custom 404 Laravel


You can also make use of abort exceptions message on the page. If you are aborting the user in your code to throw them custom exception, something like

abort(404, "A Custom Exception Message");

Then, you can make use of the exception message in your error page


<h2>{{ $exception->getMessage() }}</h2>


Similary you can create custom Error pages for other exceptions like 401, 500 etc.

Site Footer