Answer the question
In order to leave comments, you need to log in
The GET method is not supported for this route. Supported methods: POST?
I have this route:
Route::post('authors/{author}/delete-poster', '[email protected]');
I added it to delete the author's poster (picture).
Then I decided to go through a get request to see what would happen. And I generated a message from the header. So everything is right, there really is no such route. But that's not normal, right? Should I have used a different method or what?
Answer the question
In order to leave comments, you need to log in
Everything is logical. The framework works according to such rules, and not as you wanted. I want to make the behavior that you expect - we configure the routing further.
That's right, the GET method is only for getting data, and POST (PUT, DELETE, etc.) is for changing data. This is important from a security point of view, besides, POST must be backed by a CSRF token.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question