if you want to sent an http request, try to use Guzzle HTTP client.
if it's not install in your Laravel project, install it via this command :
composer require guzzlehttp/guzzle
http get example :
use Illuminate\Support\Facades\Http;
$response = Http::get('http://example.com');
$response = Http::post('http://example.com/users', [
'name' => 'Steve',
'role' => 'Network Administrator',
]);
for more information visit Laravel doc here.
note: you should provide the full link. in my case in local and with the Laragon. I provide the following URL
myproject.test/user/activity.
so in your case consider the port and the route url.it might be something like this:
localhost:8000/to/your/route
dd($request->headers->all());before dispatching it and see if you can find your Authorization header. It should be there. Maybe it's something else that's failing. Maybe it should beBearerinstead ofBasic?