use Illuminate\Http\Request; use Illuminate\Http\RequestHas; $request = Request::capture(); if (RequestHas::param($request, 'q')) { // Do something if 'q' parameter exists }
use Illuminate\Http\Request; use Illuminate\Http\RequestHas; $request = Request::capture(); if (RequestHas::header($request, 'User-Agent')) { // Do something if 'User-Agent' header exists }This package is part of the Laravel framework and can be found in the `illuminate/http` package.