laravel / 7 / api / 7.x / illuminate / foundation / bus / dispatchable.html

Dispatchable

trait Dispatchable (View source)

Methods

static PendingDispatch dispatch()

Dispatch the job with the given arguments.

static PendingDispatch|Fluent dispatchIf(bool $boolean, ...$arguments)

Dispatch the job with the given arguments if the given truth test passes.

static PendingDispatch|Fluent dispatchUnless(bool $boolean, ...$arguments)

Dispatch the job with the given arguments unless the given truth test passes.

static mixed dispatchNow()

Dispatch a command to its appropriate handler in the current process.

static mixed dispatchAfterResponse()

Dispatch a command to its appropriate handler after the current process.

static PendingChain withChain(array $chain)

Set the jobs that should run if this job is successful.

Details

static PendingDispatch dispatch()

Dispatch the job with the given arguments.

Return Value

static PendingDispatch|Fluent dispatchIf(bool $boolean, ...$arguments)

Dispatch the job with the given arguments if the given truth test passes.

Parameters

bool $boolean
...$arguments

Return Value

static PendingDispatch|Fluent dispatchUnless(bool $boolean, ...$arguments)

Dispatch the job with the given arguments unless the given truth test passes.

Parameters

bool $boolean
...$arguments

Return Value

static mixed dispatchNow()

Dispatch a command to its appropriate handler in the current process.

Return Value

mixed

static mixed dispatchAfterResponse()

Dispatch a command to its appropriate handler after the current process.

Return Value

mixed

static PendingChain withChain(array $chain)

Set the jobs that should run if this job is successful.

Parameters

array $chain

Return Value

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/7.x/Illuminate/Foundation/Bus/Dispatchable.html