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

爱⌒轻易说出口 提交于 2019-12-22 06:52:38

问题


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?


回答1:


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.

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.




回答2:


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



来源:https://stackoverflow.com/questions/47663905/how-to-edit-the-view-of-the-page-has-expired-due-to-inactivity-in-laravel-5-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!