lumen throw 405 Method Not Allowed on get route lumen throw 405 Method Not Allowed on get route laravel laravel

lumen throw 405 Method Not Allowed on get route


Just had the same behaviour, spent like an hour trying to solve it.

In the end it was trailing slash in GET query.


This is because, you are trying to access route which has POST method or you are posting data using POST method, to route which has GET method.

Check your route & form.


I tried out the scenario as-is and it works. Do you have debugging on? If you go in .env file, check if APP_DEBUG variable is set to true.

Once done, try loading the page and post the error you see.

PS: Also check if MyController controller has been created.