Member-only story
How to use Laravel for command line applications
Yes, That’s true you can actually use Laravel to create interactive command-line applications.
Please note this will be short and introductory post :D
Okay, But how?
The answer is Laravel Prompts package.
Wait, What is Laravel Prompt?
Laravel Prompts is a PHP package for adding beautiful and user-friendly forms to your command-line applications.
Laravel Prompts is perfect for accepting user input in your Artisan console commands, but it may also be used in any command-line PHP project.
So, how does it work? 🤔
Laravel Prompts is already included with the latest release of Laravel.
Laravel Prompts may also be installed in your other PHP projects by using the Composer package manager:
composer require laravel/prompts
Let’s see the example
use Laravel\Prompts\Prompt…