Adminlte Theme Integration in Yii2

After long time we have posted article about installing theme of AdminLTE for backend in Yii2 Framework. Adminlte theme integration in Yii2 useful for beginners.

Installing composer:

If you don’t have composer in your machine, download composer from Composer-Setup.exe. for Windows users.

For linux or Mac osx users please do following commands

Click here to see our demo video on Youtube:  Install AdminLTE theme in Yii2 Framework

Installing Yii:

With Composer installed, execute following commands for installing basic template of Yii2

Installtion : Yii2 – advanced template:

yii2 advanced template

During installation it needs access token key from Github.

  1. Login into your Github account
  2. Goto your settings
  3. In the left sidebar, click Personal access tokens.
  4. Click Generate new token.
  5. Give your token a descriptive name.
  6. Select the scopes, or permissions, you’d like to grant this token. To use your token to access repositories from the command line, select repo.
  7. Click Generate token.

Once installation complete then execute below commands to initialize the setup.

You can select the environment type from the given options:

yii2 init setup

After installation, backend looks like

yii2 admin panel login

In frontend looks like

yii2 frontend theme

Customize your login url of admin panel and frontend url.

Open the httpd-vhosts.conf file. in xampp\apache\conf\extra\

Added below codes onto that file

Open this directory C:\Windows\System32\drivers\etc\ and update hosts file with below lines

After that you can login with above urls for your admin panel and front end.

To install AdminLTE v2 run:

To install AdminLTE v1 run:

If you don’t have composer.phar files,

Execute the composer commands from getcomposer.org

Added below lines in your backend > config > main-local.php with inside the components array.

OUTPUT:

adminLTE theme for yii2

In Dashboard Page,
adminLTE Yii2

adminLTE dashboard theme for yii2

Comments

comments

phpexpertise

I’m Blogger and Programming Blog, Tutorials, PHP, MySQL, jQuery, Laravel, Wordpress and Codeigniter