Mdp85's avatar
Level 7

POST Request return always 404

Hi guys, i've a problem with lumen 5.5. The situation is that, if i execute a get request by axios, all works fine. But, if i try to execute a post request, i got always the 404 status code. So, any suggestions ?

0 likes
3 replies
mcstepp's avatar

Sure. Show us the code for your routes and start from there.

Mdp85's avatar
Level 7

I'm using dingo/api, and this are my routes.php file:

$api = app('Dingo\Api\Routing\Router');

$api->version('v1', function ($api) {
    $api->group(['middleware' => 'cors'], function ($api) {
        $api->post('register', 'App\Http\Controllers\RegistrationController@store');
    }); 
});
mcstepp's avatar

And the url that you're making the POST request to? Maybe your RegistrationController too.

Please or to participate in this conversation.