TIP 60 / 73

Quickly Add a Bearer Token to HTTP Request.

There’s a withToken method to attach the Authorization header to a request.

php
// Less efficient approach:
Http::withHeader([
    'Authorization' => 'Bearer dQw4w9WgXcq'
])

// More efficient approach:
Http::withToken('dQw4w9WgXcq');