PHP code example of happyproff / yii-statics

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

    

happyproff / yii-statics example snippets


'components' => [
    ...,
    'statics' => [
        'class' => 'happyproff\YiiStatics\YiiStatics',
        'assetsAlias' = 'app.assets', // необязательно
    ],
    ...
]

Yii::app()->statics->css('shop/cart'); // Опубликует файл app/assets/shop/cart.css
Yii::app()->statics->js('services'); // Опубликует файл app/assets/services.js