We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to pass a variable to Cron::add function?
$variable = 'testing'; Cron::add('example', '* * * * *', function($variable) { Log::info($variable); return null; }
The text was updated successfully, but these errors were encountered:
Yes it is. Please use the keyworkd use to pass a variable to the function.
use
$variable = 'testing'; Cron::add('example', '* * * * *', function() use ($variable) { Log::info($variable); return null; });
Sorry, something went wrong.
Thanks. That did the trick.
liebig
No branches or pull requests
Is it possible to pass a variable to Cron::add function?
The text was updated successfully, but these errors were encountered: