I am getting 404 error on my live server when using Laravel api routes. On my local, everything works fine. It is just a simple post request to register a user. Iv also tried GET request and received same result. These routes are not wrapped in any middleware. Iv setup the api as per laravel instruction from https://laravel.com/docs/5.7/passport#installation
I have tried php artisan cache:clear, restarting nginx, hard refresh browser but none of those work.
My api.php
<?php
use Illuminate\Support\Facades\Route;
Route::get('test', 'UserAuthController@test');
Route::post('register', 'UserAuthController@registerUser');
Route::post('login', 'UserAuthController@loginUser');