PHP code example of yidas / yii2-auto-asset-bundle

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

    

yidas / yii2-auto-asset-bundle example snippets


namespace app\assets;

class AutoAssetBundle extends \yidas\web\AutoAssetBundle {}

namespace app\assets;

class AutoAssetBundle extends \yidas\web\AutoAssetBundle
{
    // Base path & url for each view's asset in your application
    public $basePath = '@webroot/dist/app';
    public $baseUrl = '@web/dist/app';
    
    public $depends = [
        'app\assets\AppAsset',
    ];
}



\app\assets\AutoAssetBundle::register($this);