Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Yii2 with AdminLTE theme [closed]

Tags:

php

yii2

I'm new to Yii2 Framework and just configured Yii2 Advance application.

Now I want to configure adminLTE theme in my Yii2 Advance application without using the Composer. Somehow Composer is not getting installed on my machine.

Ref: http://www.yiiframework.com/wiki/729/tutorial-about-how-to-integrate-yii2-with-fantastic-theme-adminlte/

like image 745
J.K.A. Avatar asked Apr 06 '15 09:04

J.K.A.


1 Answers

1) Go to https://github.com/almasaeed2010/AdminLTE/releases and download last version.

2) Create folder bower in vendor path. And in bower create new folder admin-lte again.

3) Extract archive from first step to /vendor/bower/admin-lte.

4) Change your AppAsset (it is location in backend/assets folder) and add this code:

class AppAsset extends AssetBundle
{
    public $sourcePath = '@bower/';
    public $css = ['admin-lte/dist/css/AdminLTE.css'];
    public $js = ['admin-lte/dist/js/AdminLTE/app.js'];
    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
        'yii\bootstrap\BootstrapPluginAsset',
    ];
}
like image 65
vitalik_74 Avatar answered Nov 02 '22 05:11

vitalik_74