Laravel $request->bearerToken(); respond null. Laravel Doesn't see authorization header in apache web server. My code is here:
JwtMiddleware:
$jwt = $request->bearerToken();
if (!$jwt) {
Log::warning('json web token not found');
return response()->json([
'status' => 401,
'reply' => 'Unauthenticated!'
], 401);
}
I added bearer token to request in postman but it doesn't work.
Also code is working in local machine with artisan serve but it doesn't work on server.