You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a reason the schedule class is bound and booted in the Kernel constructor?
This currently limits us to being able to schedule commands in the schedule method of the console kernel itself.
I'm trying to understand if there's a reason its not registered as part of a standard service provider flow (e.g. ConsoleSupportServiceProvider) which would allow us to then add any commands we wanted to the schedule in the boot methods of other service providers within our app (using Schedule as an injected dependency in the boot method) or in packages.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is there a reason the schedule class is bound and booted in the Kernel constructor?
This currently limits us to being able to schedule commands in the schedule method of the console kernel itself.
I'm trying to understand if there's a reason its not registered as part of a standard service provider flow (e.g. ConsoleSupportServiceProvider) which would allow us to then add any commands we wanted to the schedule in the boot methods of other service providers within our app (using Schedule as an injected dependency in the boot method) or in packages.
We can use this work around but it's a bit nasty from a syntax standpoint: https://stackoverflow.com/a/63177213
I'd like to put together a PR for this but want to understand if there's a reason for this decision first.
Beta Was this translation helpful? Give feedback.
All reactions