- Notifications
You must be signed in to change notification settings - Fork11.7k
Pass Laravel context through with schedule tasks#57918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks for submitting a PR! Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface. Pull requests that are abandoned in draft may be closed due to inactivity. |
492cb95 toacb45b5Comparerodrigopedra commentedNov 26, 2025
Where would one add anything to the context when scheduling tasks? On the If so, wouldn't those commands (to add things into the context) be executed on every HTTP request, as the console commands are parsed to be avaiable using |
jradtilbrook commentedNov 26, 2025
@rodrigopedra good question, you may set some context in service providers, or in the |
rodrigopedra commentedNov 26, 2025
Haven't thought of those places. I was curious about how to do it. Thanks for the heads-up =) |
e17bf44 intolaravel:12.xUh oh!
There was an error while loading.Please reload this page.
This propagates the Laravel Context through with Schedule Tasks so they carry the same contextual information from the schedule definition. Similar to how jobs, dispatched from requests or other jobs or commands carry the context from those entrypoints, this follows suit with schedule tasks.