Closed metallurgical closed 2 years ago
Hi @metallurgical, I believe the validation would be appropriate for your case, but it needs to be done inside the handle. In my point of view, laravel-actions are generic tasks. The handle method is responsable to execute the task. If you want to validate before the handle method, you can create an validation on asJob method.
public function asJob(Team $team): void
{
//Logic to handle or not
$this->handle($team, true);
}
But that validation logic applies only to job executions.
@leandrodiogenes ok i get what you mean. asJob
would be more appropriate place to do seems i dont want to messed up handle method and i use this action file specifically for job. Thanks for the tips
Hi, may i know, is there any method that i can check the logic (return true or false) before job further running like instance without doing inside
handle()
: