Laravel: Change Default Error Pages

Written by SarahS

7th November 2019

If you want to replace the default Laravel error pages (e.g. 401, 419, 500) then it’s pretty straightforward. All you need to do is create a new folder in the ‘views’ directory and call it ‘errors’. Then create your new error pages and use the following naming conventions: code.blade.php e.g. 500.blade.php. That’s it, these new pages will then override the default ones.

If you’d like to replace them with something pretty fancy and pre-built then try the package from Laravel Collective. Check out the designs here and the code is in a GitHub repository here.

If this post helped you or if you have any questions please leave me a comment below:

0 Comments

You May Also Like…