Download the PHP package mmanos/laravel-casset without Composer
On this page you can find all versions of the php package mmanos/laravel-casset. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mmanos/laravel-casset
More information about mmanos/laravel-casset
Files in mmanos/laravel-casset
Package laravel-casset
Short Description An asset management package for Laravel 4.
License MIT
Informations about the package laravel-casset
Casset Package for Laravel 4
Casset is an asset manager for Laravel 4 applications. Some things it can do:
- Create one or more asset containers.
- Compile less files.
- Combine assets into one file.
- Minify output.
- Accept assets from Laravel package public directories.
"vendor/package::/js/file.js"
- Define dependencies for an asset.
- Define global dependencies for all assets of the same file type.
- Define an optional CDN for asset URLs.
- Optionally defer processing/combining assets to a controller (useful when distributing page requests across multiple servers).
Installation via Composer
Add this to your composer.json file, in the require object:
After that, run composer install to install Casset.
Add the service provider to app/config/app.php
, within the providers
array.
Add a class alias to app/config/app.php
, within the aliases
array.
Finally, ensure the cache directory defined in the config file is created and writable by the web server (defaults to public/assets/cache).
Edit public/assets/cache/.gitignore.
Upgrading to 1.3 from 1.2.x
Simply update the class alias in app/config/app.php
to point to the new Facade:
Usage
Add assets to the "default" container:
Add assets to a custom container:
Add an asset with a dependency on another asset:
Add a global dependency for all assets (of the same file type):
Add assets from a composer package (vendorName/packageName):
Render HTML tags to load assets for a container:
Generate a URL to an asset on the CDN server: