InteractsWithInput
Methods
server ( $key , $default ) : string|array|null
Retrieve a server variable from the request.
Parameters
- $key string|null
- $default string|array|null
hasHeader ( $key ) : bool
Determine if a header is set on the request.
Parameters
- $key string
header ( $key , $default ) : string|array|null
Retrieve a header from the request.
Parameters
- $key string|null
- $default string|array|null
bearerToken ( ) : string|null
Get the bearer token from the request headers.
exists ( $key ) : bool
Determine if the request contains a given input item key.
Parameters
- $key string|array
has ( $key ) : bool
Determine if the request contains a given input item key.
Parameters
- $key string|array
hasAny ( $keys ) : bool
Determine if the request contains any of the given inputs.
Parameters
- $keys string|array
whenHas ( $key , callable $callback , callable $default ) : $this|mixed
Apply the callback if the request contains the given input item key.
Parameters
- $key string
- $callback callable
- $default callable|null
filled ( $key ) : bool
Determine if the request contains a non-empty value for an input item.
Parameters
- $key string|array
isNotFilled ( $key ) : bool
Determine if the request contains an empty value for an input item.
Parameters
- $key string|array
anyFilled ( $keys ) : bool
Determine if the request contains a non-empty value for any of the given inputs.
Parameters
- $keys string|array
whenFilled ( $key , callable $callback , callable $default ) : $this|mixed
Apply the callback if the request contains a non-empty value for the given input item key.
Parameters
- $key string
- $callback callable
- $default callable|null
missing ( $key ) : bool
Determine if the request is missing a given input item key.
Parameters
- $key string|array
whenMissing ( $key , callable $callback , callable $default ) : $this|mixed
Apply the callback if the request is missing the given input item key.
Parameters
- $key string
- $callback callable
- $default callable|null
isEmptyString ( $key ) : bool
Determine if the given input key is an empty string for "filled".
Parameters
- $key string
keys ( ) : array
Get the keys for all of the input and files.
all ( $keys ) : array
Get all of the input and files for the request.
Parameters
- $keys array|mixed|null
input ( $key , $default ) : mixed
Retrieve an input item from the request.
Parameters
- $key string|null
- $default mixed
str ( $key , $default ) : Stringable
Retrieve input from the request as a Stringable instance.
Parameters
- $key string
- $default mixed
string ( $key , $default ) : Stringable
Retrieve input from the request as a Stringable instance.
Parameters
- $key string
- $default mixed
boolean ( $key , $default ) : bool
Retrieve input as a boolean value.
Parameters
- $key string|null
- $default bool
integer ( $key , $default ) : int
Retrieve input as an integer value.
Parameters
- $key string
- $default int
float ( $key , $default ) : float
Retrieve input as a float value.
Parameters
- $key string
- $default float
date ( $key , $format , $tz ) : Carbon |null
Retrieve input from the request as a Carbon instance.
Parameters
- $key string
- $format string|null
- $tz string|null
enum ( $key , $enumClass ) : TEnum|null
Retrieve input from the request as an enum.
Parameters
- $key string
- $enumClass class-string<\TEnum>
collect ( $key ) : Illuminate\...\Collection
Retrieve input from the request as a collection.
Parameters
- $key array|string|null
only ( $keys ) : array
Get a subset containing the provided keys with values from the input data.
Parameters
- $keys array|mixed
except ( $keys ) : array
Get all of the input except for a specified array of items.
Parameters
- $keys array|mixed
query ( $key , $default ) : string|array|null
Retrieve a query string item from the request.
Parameters
- $key string|null
- $default string|array|null
post ( $key , $default ) : string|array|null
Retrieve a request payload item from the request.
Parameters
- $key string|null
- $default string|array|null
hasCookie ( $key ) : bool
Determine if a cookie is set on the request.
Parameters
- $key string
cookie ( $key , $default ) : string|array|null
Retrieve a cookie from the request.
Parameters
- $key string|null
- $default string|array|null
allFiles ( ) : array
Get an array of all of the files on the request.
convertUploadedFiles ( array $files ) : array
Convert the given array of Symfony UploadedFiles to custom Laravel UploadedFiles.
Parameters
- $files array
hasFile ( $key ) : bool
Determine if the uploaded data contains a file.
Parameters
- $key string
isValidFile ( $file ) : bool
Check that the given file is a valid file instance.
Parameters
- $file mixed
file ( $key , $default ) : UploadedFile |Illuminate\...\UploadedFile[]|array|null
Retrieve a file from the request.
Parameters
- $key string|null
- $default mixed
retrieveItem ( $source , $key , $default ) : string|array|null
Retrieve a parameter item from a given source.
Parameters
- $source string
- $key string|null
- $default string|array|null
dd ( $keys ) : never
Dump the request items and end the script.
Parameters
- $keys mixed
dump ( $keys ) : $this
Dump the items.
Parameters
- $keys mixed