How to create a custom Error 419: Page Expired in Laravel?
Asked Answered
P

2

5

Can you help me on how to customize the default Page Expired page in Laravel?

BTW, I'm new to Laravel.

Paperboy answered 27/11, 2019 at 8:6 Comment(1)
You can create the following view: resources/views/errors/419.blade.php and customize it however you want. Custom HTTP Error Pages.Archbishop
F
19

There's a way to override this view. All you need to do is create 419.blade.php file inside the resources/views/errors folder.

If you need to find the Laravel's default 419.blade.php file, you can publish vendor files:

php artisan vendor:publish --tag=laravel-errors
Flo answered 27/11, 2019 at 8:16 Comment(3)
If this was solution you were looking for, accept it as an answer, because it might help someone in the future.Flo
just to add up, you can create custom error page on resources/view/errors folder. just name it based on the error code 404.blade.php, 500.blade.php, 401..., 503..., etc.Conway
The best solution and @Conway is so right. I tried it and everything is workingPalmary
S
0

For customized error pages like 401, 402, 403, 404, 429, 500, 503. follow this setup I will guide you in a very simple way.

  1. Enter or just copy past this command php artisan vendor:publish --tag=laravel-errors.
  2. Now just go to public/view/resources/views/error/*.

Now you can see all error pages are available here. just customize it according your needs.

Sower answered 22/10, 2024 at 16:23 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.