mriyadh
145
0
Lumen

Lumen Post Routes not working on production

Posted 3 months ago by mriyadh

Hi every 1,

I have completed my lumen api project on my local machine and its all working fine after testing all routes, push it to GitHub and clone it on my VPS install the project and add .env file , make the migration, ..etc .

Now my app doesn't accept any post request while get request run normally ?!

This is my routes :

$router->get('/', function () use ($router) {
    return 'Hello From Lumen';
});


$router->group(['prefix' => 'api'], function () use ($router) {
    $router->post('login','[email protected]');
    $router->post('signup','[email protected]');
    $router->post('verfiy','[email protected]');
    $router->post('order','[email protected]');
    
    
});

Post man request error :

MethodNotAllowedHttpException

in RoutesRequests.php line 231
at Application->handleDispatcherResponse(array(2, array('POST')))
in RoutesRequests.php line 169
at Application->Laravel\Lumen\Concerns\{closure}(object(Request))
in RoutesRequests.php line 416

I really don't know what is wrong here ? Any help will be much appreciated

Please sign in or create an account to participate in this conversation.