1. Go to this page and download the library: Download inteve/assets-manager 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/ */
inteve / assets-manager example snippets
foreach ($manager->getStylesheetsTags() as $tag) {
echo $tag;
}
foreach ($manager->getScriptsTags() as $tag) {
echo $tag;
}
foreach ($manager->getCriticalScriptsTags() as $tag) {
echo $tag;
}
$fileHashProvider = new Inteve\AssetsManager\Md5FileHashProvider(__DIR__ . '/real/path/to/assets');
$manager = new Inteve\AssetsManager\AssetsManager(
$currentEnvironment,
'/public/path/to/assets',
[],
$fileHashProvider
);
echo $manager->getPath('css/styles.css'); // prints something like '/public/path/to/assets/css/styles.ab9cd8ef76.css'