in Laravel, I created a Task but it seems I can't get the returned data from the run method inside a Task class. the $output returns false
class MyTask extends Task
{
public function configure() {}
public function run() {
return 'a'; // just an example. I can't get this data on the then()'s $output
}
}
$pool = Pool::create()->autoload(public_path('index.php'));
foreach ($items as $item) {
$pool->add(new MyTask())
->then(function ($output) {
echo $output;
})
}
in Laravel, I created a Task but it seems I can't get the returned data from the
run
method inside a Task class. the$output
returnsfalse