public function headers(): array
    {
        return collect($this->request->getHeaders())->mapWithKeys(function ($values, $header) {
            return [$header => $values[0]];
        })->all();
    }
public function headers(): array
    {
        return collect($this->request->getHeaders())->mapWithKeys(function ($values, $header) {
            return [$header => $values[0]];
        })->all();
    }
public function headers ( ) : array { return collect ( $ this -> request -> getHeaders ( ) ) -> mapWithKeys ( function ( $ values , $ header ) { return [ $ header => $ values [ 0 ] ] ; } ) -> all ( ) ; }
Gets all header values.

@return array
Gets all header values .