Skip to content

Commit

Permalink
Implement option to get a validated input using key (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
istiak-tridip authored Dec 9, 2022
1 parent 2f9277e commit 0f765b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Concerns/ValidateActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ protected function deniedAuthorization(Response $response): void
$response->authorize();
}

public function validated($key = null, $default = null): array
public function validated($key = null, $default = null): mixed
{
return $this->validator->validated();
return data_get($this->validator->validated(), $key, $default);
}

protected function prepareForValidation()
Expand Down

0 comments on commit 0f765b3

Please sign in to comment.