public function yourControllerFunction(IlluminateHttpRequest $request)
{
$header = $request->header('Authorization');
// do some stuff
}
return response($content)
->header('Content-Type', $type)
->header('X-Header-One', 'Header Value')
->header('X-Header-Two', 'Header Value');
namespace AppHttpControllers;
use IlluminateSupportFacadesRoute;
use IlluminateHttpRequest;
Route::get('/', function () {
class UserController extends Controller
{
public function store(Request $request)
{
if ($request->hasHeader('X-Header-Name')) {
//
}
}
}
});