Simple package to combine and minify CSS/JS
This package allows you to combine and minify CSS and JS files. This will improve your website's performance and decrease the HTTP request overhead.
First we need to fetch all the files, we can do this by adding the following line to
composer.json in your app's root in the
Now that the package's files were pulled we have to dump the autoloader
php artisan dump-autoload
Add the following line to the providers array:
Now add the alias to the aliases array:
'Minify' => 'GiovanniK\Minify\Minify'
Using the package is very simple, all you have to do is run a function and pass files to the function.
Minify::combine(['file.css', 'file2.css'], '.css')
Minify::combine(['file.js', 'file2.js'], '.js')