laravel npm package download in cmd code example
Example: laravel use npm package
Run npm run watch , because keeps track of all changes in .js.
In app.js add
require('select2/dist/js/select2');
Run npm run watch , because keeps track of all changes in .js.
In app.js add
require('select2/dist/js/select2');