I have deployed an API built using lumen 5.4 on shared hosting. I'm able to hit the the main domain elomena.xyz but cannot access elomena.xyz/users
Local server test with postman is successful but I get this error when i try to reach it from production environment
Not Found The requested URL /users was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
This is the content of my web.php file
$app->get('/', function () use ($app) {
return $app->version();
});
// Users
$app->get('/users', 'UserController@index');
$app->post('/users', 'UserController@store');
$app->get('/users/{user_id}', 'UserController@show');
$app->put('/users/{user_id}', 'UserController@update');
$app->delete('/users/{user_id}', 'UserController@destroy');
// Orders
$app->get('/orders', 'OrderController@index');
$app->post('/orders', 'OrderController@store');
$app->get('/orders/{order_id}', 'OrderController@show');
$app->put('/orders/{order_id}', 'OrderController@update');
$app->delete('/orders/{order_id}', 'OrderController@destroy');
I can't find the reason why I can get to elomena.xyz but not elomena.xyz/users in production environment. I need help as i have been on this for over 48hrs already.