I've installed bootstrap-calendar (using bower) to my Laravel 5 project. Bootstrap-calendar got installed into my laravel/vendor/bootstrap-calendar/ folder.
To use bootstrap-calendar, I need to reference CSS/JS files in my views, from:
laravel/vendor/bootstrap-calendar/css
laravel/vendor/bootstrap-calendar/js
Is there an easy and clean way to use these files in my project without having to copy them to the public folder?
You can use Laravel Mix (known as Laravel Elixir on Laravel <= 5.3) to perform this and other functions on your app's assets.
Laravel >= 5.4:
mix.copy('vendor/bootstrap-calendar/css', 'public/bootstrap-calendar/css');
mix.copy('vendor/bootstrap-calendar/js', 'public/bootstrap-calendar/js');
Laravel <= 5.3:
elixir(function(mix) {
mix.copy('vendor/bootstrap-calendar/css', 'public/bootstrap-calendar/css');
mix.copy('vendor/bootstrap-calendar/js', 'public/bootstrap-calendar/js');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With