Estoy haciendo un login JWT y en el momento de probar la ruta me arroja un error:
MethodNotAllowedHttpException
routes.php
Route::group(['middleware'=>'cors'], function(){
Route::post('/auth_login', 'ApiAuthController@userAuth');
});
ApiAuthController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
class ApiAuthController extends Controller
{
public function userAuth(Request $requet){
$credentials = $request->only('email','password');
$token = null;
try{
if(!$token = JWTAuth::attempt($credentials)){
return response()->json('error','invalid credentials');
}
}catch(JWTException $ex){
return responsee()->json(['error'=>'somthing_went_worng'],500);
}
return response()->json(compact('token'));
}
}
¿A qué se debe este error?