PHP code example of dawn / asset

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

    

dawn / asset example snippets


$ composer install dawn/asset

$manager = AssetManager::getInstance();
$manager->register(array(
    'jquery' => array(
        'name' => 'jquery',
        'url' => 'http://localhost/examples/',
        'js' => array('jquery.min.js'),
        'css' => array('jquery.min.css'),
    ),
    'bootstrap' => array(
        'name' => 'bootstrap',
        'url' => 'http://localhost/examples/',
        'js' => array('bootstrap.min.js'),
        'css' => array('bootstrap.min.css'),
        'dependency' => array('jquery'),
    ),
));

$manager->enqueue('bootstrap');