Majeed
218
4
Laravel

How to set Bearer access_token in request header from Laravel Back-end

Posted 10 months ago by Majeed

I'm try this way to add Bearer access_token in every request header from my middleware.

 public function handle($request, Closure $next)
    {
        $request->header('Authorization',"Bearer ".$request->bearerToken());

        return $next($request);
    }

But it's not working. Is there any way ??

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.