Tag > tip
Every Laravel 5.2 and Laravel 5.4 (UPDATE) developer has at some point seen the above default grey ‘TokenMismatchException error page’, which is usually caused when a protected page (which the user needs to be logged in to view) has not been refreshed for a long time and the users login session has timed-out. So the best option is to make the url redirect instead of showing this error message
NOTE: There is a slight difference between laravel 5.2 and 5.4 so I have included both versions of the code – $e and $exception.
So have you been wondering if there is anyway to customise the page or redirect to the default login/home page? Well it’s actually fairly easy to sort with a few changes to some of the default setting and files.
I had an issue in WordPress where blank searches were still being passed and bringing back results. So I had to find a way of stopping it from being submitted. Searching the web I found this nice little solution/snippet of code from (PAGE/URL NO LONGER EXISTS): http://callmenick.com/2013/04/24/prevent-empty-searches-in-wordpress/
You have a menu option which has several submenu options, but you don’t want that menu option selectable or linkable, only the submenu options. So how to do it.
I recently had an issue when doing a search on a WordPress site. It worked on the first page of results but once I clicked the Older posts it would take me back to the home page.