mercredi 21 octobre 2015

->after() on Laravel artisan Schedule Command with closure is a string?

$slackNotify = function() use (&$info) { ... };
$schedule->command('Calc:RPI 1 2015')->cron('0 */2 * 8-12 *')
    ->withoutOverlapping()->sendOutputTo($this->path . 'rpi.html')
    ->after($slackNotify('Calc:RPI Football 2015 finished.'));

Error: Argument 1 passed to Illuminate\Console\Scheduling\Event::after() must be an instance of Closure, string given, ...

Why does it think $slackNotify(...) is a string?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire