laravel/prompts
Laravel Prompts adds beautiful, user-friendly interactive forms to PHP CLI apps and Artisan commands. It supports placeholder text, validation, and a browser-like input experience, making it easy to collect and validate user input in the terminal.
readline() calls with interactive, browser-like forms (e.g., multi-step wizards, conditional workflows).readline() prompts in Artisan commands (e.g., php artisan migrate:fresh).Prompts + Laravel backend.readline() (e.g., dropdowns, validation, multi-step forms).getopt-style flags) with no UI overhead."Laravel Prompts lets us replace clunky CLI flags with interactive, guided workflows—like a browser form in the terminal. For example:
"This is a drop-in replacement for readline()/Symfony Console in Artisan commands, with:
select() → confirm() → text()).migrate:fresh prompt with a validated, interactive wizard—saves 2 hours/week in support tickets.""Key perks:
select() → text() → confirm().$name = Prompt::text('Name', default: 'John');
$role = Prompt::select('Role', ['admin', 'user'], required: true);
$confirm = Prompt::confirm('Proceed?', default: false);
composer require laravel/prompts → Replace one readline() call today."How can I help you explore Laravel packages today?