How to Quickly Start Laravel Dev

How to Quickly Start Laravel Dev

If you use php artisan serve for local development in Laravel and npm run watch to autocompile SCSS and JS, here’s a convenient NPM command to launch both simultaneously. I got it from a StackOverflow thread.

{
    "private": true,
    "scripts": {
        "start": "(start npm run watch && start php artisan serve) || (npm run watch & php artisan serve)", <-- This one
        "dev": "npm run development",
        ...
    },

Leave a Reply

Your email address will not be published. Required fields are marked *

Follow Me