class DeferredCallback (View source)

Methods

void
__construct(callable $callback, string|null $name = null, bool $always = false)

Create a new deferred callback instance.

name(string $name)

Specify the name of the deferred callback so it can be cancelled later.

always(bool $always = true)

Indicate that the deferred callback should run even on unsuccessful requests and jobs.

void
__invoke()

Invoke the deferred callback.

Details

void __construct(callable $callback, string|null $name = null, bool $always = false)

Create a new deferred callback instance.

Parameters

callable $callback
string|null $name
bool $always

Return Value

void

DeferredCallback name(string $name)

Specify the name of the deferred callback so it can be cancelled later.

Parameters

string $name

Return Value

DeferredCallback

DeferredCallback always(bool $always = true)

Indicate that the deferred callback should run even on unsuccessful requests and jobs.

Parameters

bool $always

Return Value

DeferredCallback

void __invoke()

Invoke the deferred callback.

Return Value

void

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.