Laravel 8 introduced Job Batching, which allows to execute jobs in batches and perform actions on batch completion.
The feature itself seems very useful, and it even has an Illuminate\Bus\Batch
instance, which allows to inspect and interact with the Jobs Batch.
There seems to be a method to fetch a single Batch by id Bus::findBatch($batchId);
, but unfortunately I couldn't find a method to fetch a collection of Batches.
Is it possible to fetch multiple Jobs Batches, or the only way is to separately call Bus::findBatch($batchId);
for each $batchId
in job_batches
table?