laravel header request code example
Example 1: laravel get header from request
public function yourControllerFunction(\Illuminate\Http\Request $request)
{
$header = $request->header('Authorization');
// do some stuff
}
Example 2: ensure a header is included with request laravel
// Returns header value with default as fallback
$request->header('someHeader', 'defaultValue');
// Returns boolean
$request->headers->has('someHeader');