-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
I was wondering around your Handbook to see if any rule would help me improve my code and in the section 'Dispatching' of the Laravel Handbook it says that using this way of dispatching jobs is bad:
// BAD
YouJob::dispatch($argument); // \Illuminate\Foundation\Bus\Dispatchable traitBecause it uses the Dispatchable trait, and that it works differently than the dispatch() helper, but that's wrong, this trait creates a PendingDispatch object the same way dispatch() does. I've used this trait pretty much always so I would like to know if I'm wrong as I think the only bad option is using the Bus Facade.
Thanks a lot!
Metadata
Metadata
Assignees
Labels
No labels