/** * Run a task * * @param mixed $data */ public function run($data) { $this->task->addValues($data); if ($this->task->validate() === true) { return $this->task->run(); } $errors = $this->task->getErrors(); Env::error($this->formatErrors($errors)); }