user1679267 user1679267 - 7 months ago 61
PHP Question

MethodNotAllowedHttpException redirect to home page

is it possible to redirect user to home page when ever MethodNotAllowedHttpException occurs in laravel 5 or which template i should modify to edit the display of MethodNotAllowedHttpException


rfc2616 10.4.6 405 Method Not Allowed

in Laravel if you specify your .env


and create


it will render that file each time an 405 code occurs, i don't think the redirect is possible , but you can always add some javascript into 405 error template for the user to be redirected.

setTimeout(function(){ window.location.href='/'; },10000);