New composer run dev command in Laravel
Posted By
kamlesh paulon
Dec 11, 2024Laravel has recently introduced the composer run dev
command to the framework, allowing you to run multiple commands simultaneously:
- php artisan serve
- php artisan queue:listen --tries=1
- php artisan pail
- npm run dev
All of these commands can now be executed in one go, with color-coded output in the terminal using the concurrently package. This feature provides a convenient way to start the application along with all the essential services you need.
The pull request also includes Tailwind CSS
out of the box, enabling you to start using Tailwind immediately without the need to install any starter kit. This is particularly useful for developers who want to experiment or build projects from scratch.
For users of older Laravel versions who wish to utilize this new feature, simply add the following to your composer.json
in the scripts section:
This configuration will work the same way as the new
composer run dev
command introduced in the pull request.