Member-only story

Laravel Prompts: Simplify and Enhance Artisan Commands

I Nyoman Jyotisa
3 min readJan 7, 2025

--

Laravel Prompts, unveiled by Jess Archer at Laracon US on July 19, 2023, is a powerful tool designed to elevate the developer experience when building Artisan commands. This guide will help you get started with this innovative package, making your commands more interactive and visually appealing.

Prerequisites for Using Laravel Prompts

Before diving in, ensure your environment meets these requirements:

  • Supported Operating Systems: macOS, Linux, or Windows with WSL. Outside of WSL, the package defaults to Symfony’s implementation for its features.
  • Laravel Version: 10 or higher.
  • PHP Version: 8.1 or above.

Installing Laravel Prompts

Installation is straightforward as the package doesn’t require any configuration or publishing of service providers. Run the following command:

composer require laravel/prompts

Once installed, you’re ready to start building enhanced Artisan commands.

Building Your First Command with Laravel Prompts

Laravel Prompts significantly simplifies creating interactive Artisan commands. Let’s start with a…

--

--

No responses yet