class Can implements Rule, ValidatorAwareRule (View source)
| protected string | $ability | The ability to check. | |
| protected array | $arguments | The arguments to pass to the authorization check. | |
| protected Validator | $validator | The current validator instance. |
| __construct(string $ability, array $arguments = []) Constructor. | ||
| bool | passes(string $attribute, mixed $value)
Determine if the validation rule passes. | |
| string|array | message()
Get the validation error message. | |
| $this | setValidator(Validator $validator)
Set the current validator. |
Constructor.
Determine if the validation rule passes.
Get the validation error message.
Set the current validator.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Validation/Rules/Can.html