PHP code example of vanpattenmedia / quickassets

1. Go to this page and download the library: Download vanpattenmedia/quickassets 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/ */

    

vanpattenmedia / quickassets example snippets


use VanPattenMedia\QuickAssets\QuickAsset;

$a = new QuickAsset();

$a->addAssetType('css', array(
	'assetPath' => 'assets/stylesheets',
	'rootPath'  => __DIR__ . '../../public/assets/stylesheets',
));

$a->addHost('/', array(
	'assetTypes' => [ 'css' ],
));

<link rel="stylesheet" href=" echo $a->url('css', 'style.css'); 

<link rel="stylesheet" href="/assets/stylesheets/style.css?20130626010446">

$quickAsset = new \VanPattenMedia\QuickAssets\QuickAsset();

$quickAsset->addAssetType( 'css', arr...

$twig->addExtension( new \VanPattenMedia\QuickAssets\TwigExtension( $quickAsset ) );