I am developing APIs using Laravel and I am new to it. I am using following method as route for my api but facing error.
Route in api.php:
Route::post('user/register','UserController@Register')->middleware('auth:api');
Error:
MethodNotAllowedHttpException
Is there any setting or something else which I have missed.
You should add /api
in your url when you trying to access api routes, so it should look like this 127.0.0.1:8000/api/user/register