Laravel 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:
"dev": [
"Composer\\Config::disableProcessTimeout",
"npx concurrently -k -c \"#93c5fd,#c4b5fd,#d4d4d8,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail\" \"npm run dev\" --names=server,queue,logs,vite"
]This configuration will work the same way as the new
composer run devcommand introduced in the pull request.
