Skip to content

Commit

Permalink
✨ Support prepareForValidation method
Browse files Browse the repository at this point in the history
See #23
  • Loading branch information
lorisleiva committed Oct 17, 2019
1 parent f7f7cb5 commit 9c99635
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,20 @@ public function runAs(Action $action)
public function run(array $attributes = [])
{
$this->fill($attributes);
$this->prepareForValidation();
$this->resolveBeforeHook();
$this->resolveAuthorization();
$this->resolveValidation();

return $this->resolveAndCall($this, 'handle');
}

public function resolveBeforeHook()
protected function prepareForValidation()
{
//
}

protected function resolveBeforeHook()
{
$method = 'as' . Str::studly($this->runningAs);

Expand Down

0 comments on commit 9c99635

Please sign in to comment.