Answer the question
In order to leave comments, you need to log in
How to call event after job execution?
Can't call event after job is done. What is written in the documentation does not work.
I call job in the controller:
class testController extends Controller
{
public function test(){
test::dispatch();
}
}
class test implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function handle()
{
Log::info('dispatch test job');
}
}
public function boot()
{
Queue::after(function ( JobProcessed $event ) {
Log::info($event->connectionName);
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question