Skip to content

Conversation

@SjorsO
Copy link
Contributor

@SjorsO SjorsO commented Sep 20, 2021

We can render a custom HTTP error page by creating view file for a specific status code (eg: errors/404.blade.php). This PR adds support for a fallback if the exact status code does not have a view: errors/4xx.blade.php

One of my projects has views defined for most status codes. Each view shows a helpful friendly message in Dutch. Yesterday my customer ran into a 405 error that did not have a view. This scary English error was displayed:
image

With this PR, I can create errors/4xx.blade.php and errors/5xx.blade.php views to ensure that I always render a helpful custom error page.

@taylorotwell taylorotwell merged commit 818d736 into laravel:master Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants