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 Expectation
shouldReceive()

Initiate a mock expectation on the facade.

from  Facade
static Expectation
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 Request
instance()

No description

static string
method()

No description

static string
root()

No description

static string
url()

No description

static string
fullUrl()

No description

static string
fullUrlWithQuery(array $query)

No description

static string
path()

No description

static string
decodedPath()

No description

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

No description

static array
segments()

No description

static bool
is(mixed $patterns)

No description

static bool
routeIs(mixed $patterns)

No description

static bool
fullUrlIs(mixed $patterns)

No description

static bool
ajax()

No description

static bool
pjax()

No description

static bool
secure()

No description

static string
ip()

No description

static array
ips()

No description

static string
userAgent()

No description

static Request
merge(array $input)

No description

static Request
replace(array $input)

No description

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

No description

static Store
session()

No description

static Store|null
getSession()

No description

static void
setLaravelSession(Session $session)

No description

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

No description

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

No description

static string
fingerprint()

No description

static Request
setJson(ParameterBag $json)

No description

static Closure
getUserResolver()

No description

static Request
setUserResolver(Closure $callback)

No description

static Closure
getRouteResolver()

No description

static Request
setRouteResolver(Closure $callback)

No description

static array
toArray()

No description

static bool
offsetExists(string $offset)

No description

static mixed
offsetGet(string $offset)

No description

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

No description

static void
offsetUnset(string $offset)

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 Expectation shouldReceive()

Initiate a mock expectation on the facade.

Return Value

Expectation

static protected Expectation createFreshMockInstance()

Create a fresh mock instance for the given class.

Return Value

Expectation

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 Request instance()

No description

Return Value

Request

static string method()

No description

Return Value

string

static string root()

No description

Return Value

string

static string url()

No description

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 path()

No description

Return Value

string

static string decodedPath()

No description

Return Value

string

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

No description

Parameters

int $index
string|null $default

Return Value

string|null

static array segments()

No description

Return Value

array

static bool is(mixed $patterns)

No description

Parameters

mixed $patterns

Return Value

bool

static bool routeIs(mixed $patterns)

No description

Parameters

mixed $patterns

Return Value

bool

static bool fullUrlIs(mixed $patterns)

No description

Parameters

mixed $patterns

Return Value

bool

static bool ajax()

No description

Return Value

bool

static bool pjax()

No description

Return Value

bool

static bool secure()

No description

Return Value

bool

static string ip()

No description

Return Value

string

static array ips()

No description

Return Value

array

static string userAgent()

No description

Return Value

string

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 ParameterBag|mixed json(string $key = null, mixed $default)

No description

Parameters

string $key
mixed $default

Return Value

ParameterBag|mixed

static Store session()

No description

Return Value

Store

static Store|null getSession()

No description

Return Value

Store|null

static void setLaravelSession(Session $session)

No description

Parameters

Session $session

Return Value

void

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

No description

Parameters

string|null $guard

Return Value

mixed

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

No description

Parameters

string|null $param

Return Value

Route|object|string

static string fingerprint()

No description

Return Value

string

static Request setJson(ParameterBag $json)

No description

Parameters

ParameterBag $json

Return Value

Request

static Closure getUserResolver()

No description

Return Value

Closure

static Request setUserResolver(Closure $callback)

No description

Parameters

Closure $callback

Return Value

Request

static Closure getRouteResolver()

No description

Return Value

Closure

static Request setRouteResolver(Closure $callback)

No description

Parameters

Closure $callback

Return Value

Request

static array toArray()

No description

Return Value

array

static bool offsetExists(string $offset)

No description

Parameters

string $offset

Return Value

bool

static mixed offsetGet(string $offset)

No description

Parameters

string $offset

Return Value

mixed

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