Description
I am really struggling to get a POST request to create a new model entry to work. I get "405 Method Not Allowed" no matter what I do.
Note I am using Laravel 5.3 and trying to use Passport with v0.6.2 of this API package on a Homestead development environment. When using Postman to test, if I have the Passport auth API disabled then a GET request works but with Passport on (and no auth effort attempted in Postman) it refuses. This is expected and appears to show that Passport is working as expected.
So now I am trying to consume the API within my website itself per one of the features of Passport. Here, a GET request works but a POST request to the same resource gets "method not allowed". The "X-CSRF-TOKEN" and "X-XSRF-TOKEN" is being included with every request.
Laravel docs mention a "laravel_token" baked in to the session cookie I can see it is provided with each session but is not included in a request cookie or the headers, and for the life of me I cannot figure out how or if I am meant to return this on a request. I can find almost nothing about "laravel_token" online.
https://laravel.com/docs/5.3/passport#consuming-your-api-with-javascript
Any thoughts on where to start?
Code references will follow.