Laravel 5 POST routes to index instead of store
The problem was caused by a trailing /
being added to the URL. So, instead of using this URL:
mydomain.com/api/v1/messages/
I tried with this one:
mydomain.com/api/v1/messages
and it worked.
I discovered it by taking a look at the server's log. That is how I discovered that POST requests to the URL messages/
were redirected.