PendingBatch
Properties
$name string
The batch name.
$jobs Illuminate\...\Collection
The jobs that belong to the batch.
$options array
The batch options.
Methods
__construct ( Container $container , Illuminate\...\Collection $jobs ) : void
Create a new pending batch instance.
Parameters
- $container Container
- $jobs Illuminate\...\Collection
add ( $jobs ) : $this
Add jobs to the batch.
Parameters
- $jobs iterable|object|array
then ( $callback ) : $this
Add a callback to be executed after all jobs in the batch have executed successfully.
Parameters
- $callback callable
thenCallbacks ( ) : array
Get the "then" callbacks that have been registered with the pending batch.
catch ( $callback ) : $this
Add a callback to be executed after the first failing job in the batch.
Parameters
- $callback callable
catchCallbacks ( ) : array
Get the "catch" callbacks that have been registered with the pending batch.
finally ( $callback ) : $this
Add a callback to be executed after the batch has finished executing.
Parameters
- $callback callable
finallyCallbacks ( ) : array
Get the "finally" callbacks that have been registered with the pending batch.
allowFailures ( $allowFailures ) : $this
Indicate that the batch should not be cancelled when a job within the batch fails.
Parameters
- $allowFailures bool
allowsFailures ( ) : bool
Determine if the pending batch allows jobs to fail without cancelling the batch.
name ( string $name ) : $this
Set the name for the batch.
Parameters
- $name string
onConnection ( string $connection ) : $this
Specify the queue connection that the batched jobs should run on.
Parameters
- $connection string
connection ( ) : string|null
Get the connection used by the pending batch.
onQueue ( string $queue ) : $this
Specify the queue that the batched jobs should run on.
Parameters
- $queue string
queue ( ) : string|null
Get the queue used by the pending batch.
withOption ( string $key , $value ) : $this
Add additional data into the batch's options array.
Parameters
- $key string
- $value mixed
dispatchAfterResponse ( ) : Batch
Dispatch the batch after the response is sent to the browser.
dispatchExistingBatch ( $batch ) : void
Dispatch an existing batch.
Parameters
- $batch Batch