Back to JWT Auth API Support

wilson30098
wilson30098

I use the following code on my own plugin:

Route::post('test', function (\Request $request) { return response()->json(('The test was successful')); })->middleware('\Tymon\JWTAuth\Middleware\GetUserFromToken');

But when I post something to this route, it always return the status 503 Service Unavailable, and I tested \Tymon\JWTAuth\Middleware\GetUserFromToken::handle() that is never called

but when I change Route::post to Route::get, \Tymon\JWTAuth\Middleware\GetUserFromToken::handle() will call successful.

Any idea for this situation? Thanks

Last updated

wilson30098
wilson30098

I changed Route::post('test'... to another route, the middleware work now

1-2 of 2