rkron86's avatar

Laravel job finish callback - unable to call any function

Trying to call a test method after batch successfully executes. But if i add any method other than Log or echo it does not at all execute and batch itself is stuck.

$batch = Bus::batch([

])->then(function (Batch $batch) {
    // All jobs completed successfully...
})->catch(function (Batch $batch, Throwable $e) {
    // First batch job failure detected...
})->finally(function (Batch $batch) {
    // The batch has finished executing...
            $this->test(); // dummy method and job bus or job is never dispatched
})->dispatch();
0 likes
0 replies

Please or to participate in this conversation.