PHP code example of pschur / assets
1. Go to this page and download the library: Download pschur/assets library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pschur / assets example snippets
use Pschur\Assets\Asset;
// REQUIRED
Asset::setAssetCache(__DIR__.'/cache'); // Define a cache where the package can store some data
Asset::setAssetUrl('/assets.php'); // Define the url, where the Asset Manager can get its data.
// OPTIONAL
Asset::setAutoOptimize(true); // If you want to create automatic optimized data set this to true. I don't recommend this while developing!