class Request extends Facade (View source)

Properties

static protected Application $app

The application instance being facaded.

from  Facade
static protected array $resolvedInstance

The resolved object instances.

from  Facade

Methods

static void
resolved(Closure $callback)

Run a Closure when the facade has been resolved.

from  Facade
static MockInterface
spy()

Convert the facade into a Mockery spy.

from  Facade
static MockInterface
partialMock()

Initiate a partial mock on the facade.

from  Facade
static Expectation
shouldReceive()

Initiate a mock expectation on the facade.

from  Facade
static MockInterface
createFreshMockInstance()

Create a fresh mock instance for the given class.

from  Facade
static MockInterface
createMock()

Create a fresh mock instance for the given class.

from  Facade
static bool
isMock()

Determines whether a mock is set as the instance of the facade.

from  Facade
static string|null
getMockableClass()

Get the mockable class for the bound instance.

from  Facade
static void
swap(mixed $instance)

Hotswap the underlying instance behind the facade.

from  Facade
static mixed
getFacadeRoot()

Get the root object behind the facade.

from  Facade
static string
getFacadeAccessor()

Get the registered name of the component.

static mixed
resolveFacadeInstance(object|string $name)

Resolve the facade root instance from the container.

from  Facade
static void
clearResolvedInstance(string $name)

Clear a resolved facade instance.

from  Facade
static void
clearResolvedInstances()

Clear all of the resolved instances.

from  Facade
static Application
getFacadeApplication()

Get the application instance behind the facade.

from  Facade
static void
setFacadeApplication(Application $app)

Set the application instance.

from  Facade
static mixed
__callStatic(string $method, array $args)

Handle dynamic, static calls to the object.

from  Facade
static Closure
getRouteResolver()

No description

static Closure
getUserResolver()

No description

static Request
capture()

No description

static Request
createFrom(Request $from, Request|null $to = null)

No description

static Request
createFromBase(Request $request)

No description

static Request
duplicate(array|null $query = null, array|null $request = null, array|null $attributes = null, array|null $cookies = null, array|null $files = null, array|null $server = null)

No description

static Request
instance()

No description

static Request
merge(array $input)

No description

static Request
replace(array $input)

No description

static Request
setJson(ParameterBag $json)

No description

static Request
setRouteResolver(Closure $callback)

No description

static Request
setUserResolver(Closure $callback)

No description

static UploadedFile[]|array|null
file(string|null $key = null, mixed $default = null)

No description

static Route|object|string
route(string|null $param = null, string|null $default = null)

No description

static Store
session()

No description

static Store|null
getSession()

No description

static ParameterBag|mixed
json(string|null $key = null, mixed $default = null)

No description

static array
all(array|mixed|null $keys = null)

No description

static array
allFiles()

No description

static array
except(array|mixed $keys)

No description

static array
ips()

No description

static array
keys()

No description

static array
only(array|mixed $keys)

No description

static array
segments()

No description

static array
toArray()

No description

static array
validate(array $rules, mixed $params)

No description

static array
validateWithBag(string $errorBag, array $rules, mixed $params)

No description

static bool
accepts(string|array $contentTypes)

No description

static bool
acceptsAnyContentType()

No description

static bool
acceptsHtml()

No description

static bool
acceptsJson()

No description

static bool
ajax()

No description

static bool
anyFilled(string|array $key)

No description

static bool
exists(string|array $key)

No description

static bool
expectsJson()

No description

static bool
filled(string|array $key)

No description

static bool
fullUrlIs(mixed $patterns)

No description

static bool
has(string|array $key)

No description

static bool
hasAny(string|array $key)

No description

static bool
hasCookie(string $key)

No description

static bool
hasFile(string $key)

No description

static bool
hasHeader(string $key)

No description

static bool
hasValidSignature(bool $absolute = true)

No description

static bool
is(mixed $patterns)

No description

static bool
isJson()

No description

static bool
matchesType(string $actual, string $type)

No description

static bool
offsetExists(string $offset)

No description

static bool
pjax()

No description

static bool
prefers(string|array $contentTypes)

No description

static bool
prefetch()

No description

static bool
routeIs(mixed $patterns)

No description

static bool
secure()

No description

static bool
wantsJson()

No description

static mixed
filterFiles(mixed $files)

No description

static mixed
offsetGet(string $offset)

No description

static mixed
user(string|null $guard = null)

No description

static string
decodedPath()

No description

static string
fingerprint()

No description

static string
format(mixed $default)

No description

static string
fullUrl()

No description

static string
fullUrlWithQuery(array $query)

No description

static string
method()

No description

static string
path()

No description

static string
root()

No description

static string
url()

No description

static string
userAgent()

No description

static string|array
old(string|null $key = null, string|array|null $default = null)

No description

static string|array|null
cookie(string|null $key = null, string|array|null $default = null)

No description

static string|array|null
header(string|null $key = null, string|array|null $default = null)

No description

static string|array|null
input(string|null $key = null, string|array|null $default = null)

No description

static string|array|null
post(string|null $key = null, string|array|null $default = null)

No description

static string|array|null
query(string|null $key = null, string|array|null $default = null)

No description

static string|array|null
server(string|null $key = null, string|array|null $default = null)

No description

static string|null
bearerToken()

No description

static string|null
ip()

No description

static string|null
segment(int $index, string|null $default = null)

No description

static void
flash()

No description

static void
flashExcept(array|mixed $keys)

No description

static void
flashOnly(array|mixed $keys)

No description

static void
flush()

No description

static void
offsetSet(string $offset, mixed $value)

No description

static void
offsetUnset(string $offset)

No description

static void
setLaravelSession(Session $session)

No description

Details

static void resolved(Closure $callback)

Run a Closure when the facade has been resolved.

Parameters

Closure $callback

Return Value

void

static MockInterface spy()

Convert the facade into a Mockery spy.

Return Value

MockInterface

static MockInterface partialMock()

Initiate a partial mock on the facade.

Return Value

MockInterface

static Expectation shouldReceive()

Initiate a mock expectation on the facade.

Return Value

Expectation

static protected MockInterface createFreshMockInstance()

Create a fresh mock instance for the given class.

Return Value

MockInterface

static protected MockInterface createMock()

Create a fresh mock instance for the given class.

Return Value

MockInterface

static protected bool isMock()

Determines whether a mock is set as the instance of the facade.

Return Value

bool

static protected string|null getMockableClass()

Get the mockable class for the bound instance.

Return Value

string|null

static void swap(mixed $instance)

Hotswap the underlying instance behind the facade.

Parameters

mixed $instance

Return Value

void

static mixed getFacadeRoot()

Get the root object behind the facade.

Return Value

mixed

static protected string getFacadeAccessor()

Get the registered name of the component.

Return Value

string

static protected mixed resolveFacadeInstance(object|string $name)

Resolve the facade root instance from the container.

Parameters

object|string $name

Return Value

mixed

static void clearResolvedInstance(string $name)

Clear a resolved facade instance.

Parameters

string $name

Return Value

void

static void clearResolvedInstances()

Clear all of the resolved instances.

Return Value

void

static Application getFacadeApplication()

Get the application instance behind the facade.

Return Value

Application

static void setFacadeApplication(Application $app)

Set the application instance.

Parameters

Application $app

Return Value

void

static mixed __callStatic(string $method, array $args)

Handle dynamic, static calls to the object.

Parameters

string $method
array $args

Return Value

mixed

Exceptions

RuntimeException

static Closure getRouteResolver()

No description

Return Value

Closure

static Closure getUserResolver()

No description

Return Value

Closure

static Request capture()

No description

Return Value

Request

static Request createFrom(Request $from, Request|null $to = null)

No description

Parameters

Request $from
Request|null $to

Return Value

Request

static Request createFromBase(Request $request)

No description

Parameters

Request $request

Return Value

Request

static Request duplicate(array|null $query = null, array|null $request = null, array|null $attributes = null, array|null $cookies = null, array|null $files = null, array|null $server = null)

No description

Parameters

array|null $query
array|null $request
array|null $attributes
array|null $cookies
array|null $files
array|null $server

Return Value

Request

static Request instance()

No description

Return Value

Request

static Request merge(array $input)

No description

Parameters

array $input

Return Value

Request

static Request replace(array $input)

No description

Parameters

array $input

Return Value

Request

static Request setJson(ParameterBag $json)

No description

Parameters

ParameterBag $json

Return Value

Request

static Request setRouteResolver(Closure $callback)

No description

Parameters

Closure $callback

Return Value

Request

static Request setUserResolver(Closure $callback)

No description

Parameters

Closure $callback

Return Value

Request

static UploadedFile[]|array|null file(string|null $key = null, mixed $default = null)

No description

Parameters

string|null $key
mixed $default

Return Value

UploadedFile[]|array|null

static Route|object|string route(string|null $param = null, string|null $default = null)

No description

Parameters

string|null $param
string|null $default

Return Value

Route|object|string

static Store session()

No description

Return Value

Store

static Store|null getSession()

No description

Return Value

Store|null

static ParameterBag|mixed json(string|null $key = null, mixed $default = null)

No description

Parameters

string|null $key
mixed $default

Return Value

ParameterBag|mixed

static array all(array|mixed|null $keys = null)

No description

Parameters

array|mixed|null $keys

Return Value

array

static array allFiles()

No description

Return Value

array

static array except(array|mixed $keys)

No description

Parameters

array|mixed $keys

Return Value

array

static array ips()

No description

Return Value

array

static array keys()

No description

Return Value

array

static array only(array|mixed $keys)

No description

Parameters

array|mixed $keys

Return Value

array

static array segments()

No description

Return Value

array

static array toArray()

No description

Return Value

array

static array validate(array $rules, mixed $params)

No description

Parameters

array $rules
mixed $params

Return Value

array

static array validateWithBag(string $errorBag, array $rules, mixed $params)

No description

Parameters

string $errorBag
array $rules
mixed $params

Return Value

array

static bool accepts(string|array $contentTypes)

No description

Parameters

string|array $contentTypes

Return Value

bool

static bool acceptsAnyContentType()

No description

Return Value

bool

static bool acceptsHtml()

No description

Return Value

bool

static bool acceptsJson()

No description

Return Value

bool

static bool ajax()

No description

Return Value

bool

static bool anyFilled(string|array $key)

No description

Parameters

string|array $key

Return Value

bool

static bool exists(string|array $key)

No description

Parameters

string|array $key

Return Value

bool

static bool expectsJson()

No description

Return Value

bool

static bool filled(string|array $key)

No description

Parameters

string|array $key

Return Value

bool

static bool fullUrlIs(mixed $patterns)

No description

Parameters

mixed $patterns

Return Value

bool

static bool has(string|array $key)

No description

Parameters

string|array $key

Return Value

bool

static bool hasAny(string|array $key)

No description

Parameters

string|array $key

Return Value

bool

static bool hasCookie(string $key)

No description

Parameters

string $key

Return Value

bool

static bool hasFile(string $key)

No description

Parameters

string $key

Return Value

bool

static bool hasHeader(string $key)

No description

Parameters

string $key

Return Value

bool

static bool hasValidSignature(bool $absolute = true)

No description

Parameters

bool $absolute

Return Value

bool

static bool is(mixed $patterns)

No description

Parameters

mixed $patterns

Return Value

bool

static bool isJson()

No description

Return Value

bool

static bool matchesType(string $actual, string $type)

No description

Parameters

string $actual
string $type

Return Value

bool

static bool offsetExists(string $offset)

No description

Parameters

string $offset

Return Value

bool

static bool pjax()

No description

Return Value

bool

static bool prefers(string|array $contentTypes)

No description

Parameters

string|array $contentTypes

Return Value

bool

static bool prefetch()

No description

Return Value

bool

static bool routeIs(mixed $patterns)

No description

Parameters

mixed $patterns

Return Value

bool

static bool secure()

No description

Return Value

bool

static bool wantsJson()

No description

Return Value

bool

static mixed filterFiles(mixed $files)

No description

Parameters

mixed $files

Return Value

mixed

static mixed offsetGet(string $offset)

No description

Parameters

string $offset

Return Value

mixed

static mixed user(string|null $guard = null)

No description

Parameters

string|null $guard

Return Value

mixed

static string decodedPath()

No description

Return Value

string

static string fingerprint()

No description

Return Value

string

static string format(mixed $default)

No description

Parameters

mixed $default

Return Value

string

static string fullUrl()

No description

Return Value

string

static string fullUrlWithQuery(array $query)

No description

Parameters

array $query

Return Value

string

static string method()

No description

Return Value

string

static string path()

No description

Return Value

string

static string root()

No description

Return Value

string

static string url()

No description

Return Value

string

static string userAgent()

No description

Return Value

string

static string|array old(string|null $key = null, string|array|null $default = null)

No description

Parameters

string|null $key
string|array|null $default

Return Value

string|array

No description

Parameters

string|null $key
string|array|null $default

Return Value

string|array|null

static string|array|null header(string|null $key = null, string|array|null $default = null)

No description

Parameters

string|null $key
string|array|null $default

Return Value

string|array|null

static string|array|null input(string|null $key = null, string|array|null $default = null)

No description

Parameters

string|null $key
string|array|null $default

Return Value

string|array|null

static string|array|null post(string|null $key = null, string|array|null $default = null)

No description

Parameters

string|null $key
string|array|null $default

Return Value

string|array|null

static string|array|null query(string|null $key = null, string|array|null $default = null)

No description

Parameters

string|null $key
string|array|null $default

Return Value

string|array|null

static string|array|null server(string|null $key = null, string|array|null $default = null)

No description

Parameters

string|null $key
string|array|null $default

Return Value

string|array|null

static string|null bearerToken()

No description

Return Value

string|null

static string|null ip()

No description

Return Value

string|null

static string|null segment(int $index, string|null $default = null)

No description

Parameters

int $index
string|null $default

Return Value

string|null

static void flash()

No description

Return Value

void

static void flashExcept(array|mixed $keys)

No description

Parameters

array|mixed $keys

Return Value

void

static void flashOnly(array|mixed $keys)

No description

Parameters

array|mixed $keys

Return Value

void

static void flush()

No description

Return Value

void

static void offsetSet(string $offset, mixed $value)

No description

Parameters

string $offset
mixed $value

Return Value

void

static void offsetUnset(string $offset)

No description

Parameters

string $offset

Return Value

void

static void setLaravelSession(Session $session)

No description

Parameters

Session $session

Return Value

void