In this episode, we're diving into a neat new addition you'll find in fresh Laravel installs: the handy composer run dev
command. We start off by showing how to make sure your npm dependencies are installed, then take a peek inside the composer.json
file to learn what exactly this new dev script does.
Basically, composer run dev
uses npx concurrently
to launch several useful development commands at once. It fires up:
php artisan serve
(a local server for Laravel)pale
(a Laravel app that shows your logs live in the terminal)npm run dev
(for frontend assets)These all run side-by-side in your terminal, each color-coded for clarity, so you can easily tell what's what. This means you don't have to juggle multiple terminal tabs while developing anymore—just one command runs everything you need.
We also see a quick demo: making a log in the app, refreshing the browser, and watching it appear in real time in the logs thanks to pale
. At the end, there are tips on customizing the script—want to drop or add commands, or tweak colors? Go for it! The composer.json
is yours to edit freely.
TL;DR: If you're working locally with Laravel, this new command is a big convenience boost that'll help you get started faster and keep your workflow smooth.