Skip to content

Instantly share code, notes, and snippets.

@vulieumang
Forked from vades/laravel-auto-refresh.md
Created October 13, 2021 15:25
Show Gist options
  • Save vulieumang/5efa66792a40f84733ac4e0635bb8aec to your computer and use it in GitHub Desktop.
Save vulieumang/5efa66792a40f84733ac4e0635bb8aec to your computer and use it in GitHub Desktop.
Auto refresh after changes with Laravel Mix

Laravel auto refresh after changes

To achieve this you can use Laravel Mix

  1. Ensure that Node.js and NPM are installed: run node -v and npm -v.
  2. Install Laravel Mix npm install.
  3. Open webpack.mix.js and add mix.browserSync('127.0.0.1:8000');.
  4. Run php artisan serve.
  5. And the npm run watch.

Sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment