Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit the view of "The page has expired due to inactivity" in Laravel 5.5

In Laravel 5.5, When you are using CSRF protection (by default) and you send a post request after long inactivity you'll get this error page (Screenshot).
I'm ok with this error however, I need to change the view/text of this error to match my application style and my language for sure.

Any Ideas in how to edit this view?

Screenshot from Laravel 5.5 error page

like image 471
Hamed Adil Avatar asked Dec 05 '17 22:12

Hamed Adil


2 Answers

You can override the default view by placing a 419.blade.php file in the resources/views/errors folder.

If you're using an editor with global search capabilities, you can search for the error message inside your project. For example, in Visual Studio Code you can press Ctrl + Shift + F to search inside the project.

enter image description here

I use it all the time to find the files which are part of the framework that I need to customize.

More on overriding the error views in this section of the official docs.

like image 184
Amade Avatar answered Nov 14 '22 22:11

Amade


You can override the default view by placing a 419.blade.php file in the resources/views/errors folder.

like image 42
Mijora Amid Avatar answered Nov 14 '22 21:11

Mijora Amid