ConfiguresPrompts
trait ConfiguresPrompts (View source)
Methods
| void | configurePrompts(InputInterface $input)
Configure the prompt fallbacks. | |
| mixed | promptUntilValid(Closure $prompt, bool|string $required, Closure|null $validate)
Prompt the user until the given validation callback passes. | |
| ?string | validatePrompt(mixed $value, mixed $rules)
Validate the given prompt value using the validator. | |
| Validator | getPromptValidatorInstance(mixed $field, mixed $value, mixed $rules, array $messages = [], array $attributes = [])
Get the validator instance that should be used to validate prompts. | |
| array | validationMessages()
Get the validation messages that should be used during prompt validation. | |
| array | validationAttributes()
Get the validation attributes that should be used during prompt validation. | |
| void | restorePrompts()
Restore the prompts output. |
Details
protected void configurePrompts(InputInterface $input)
Configure the prompt fallbacks.
protected mixed promptUntilValid(Closure $prompt, bool|string $required, Closure|null $validate)
Prompt the user until the given validation callback passes.
protected ?string validatePrompt(mixed $value, mixed $rules)
Validate the given prompt value using the validator.
protected Validator getPromptValidatorInstance(mixed $field, mixed $value, mixed $rules, array $messages = [], array $attributes = [])
Get the validator instance that should be used to validate prompts.
protected array validationMessages()
Get the validation messages that should be used during prompt validation.
protected array validationAttributes()
Get the validation attributes that should be used during prompt validation.
protected void restorePrompts()
Restore the prompts output.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Console/Concerns/ConfiguresPrompts.html