定制 potime/yii2-adminlte4 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

potime/yii2-adminlte4

最新稳定版本:0.0.3

Composer 安装命令:

composer require potime/yii2-adminlte4

包简介

AdminLTE 4 for Yii 2.0 Framework

README 文档

README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist potime/yii2-adminlte4 "*"

or add

"potime/yii2-adminlte4": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

'components' => [
    'view' => [
         'theme' => [
             'pathMap' => [
                '@app/views' => '@vendor/potime/yii2-adminlte4/src/example/yii2-views'
             ],
         ],
    ],
],

This asset bundle provides sample files for layout and view (see folder examples/), they are not meant to be customized directly in the vendor/ folder.

Therefore it is recommended to copy the views into your application and adjust them to your needs.

Customization

Widget Menu (Left Sidebar)

'items' => [
    [
        'label' => 'YII Tools',
        'iconType' => 'far',
        'icon' => 'share',
        'badge' => ['message' => 'New', 'badgeType' => 'danger'],
        'items' => [
            ['label' => 'Login', 'url' => ['site/login'], 'icon' => 'sign-in-alt', 'visible' => Yii::$app->user->isGuest],
            ['label' => 'Gii', 'url' => ['/gii'], 'icon' => 'file-code', 'target' => '_blank'],
            ['label' => 'Debug', 'url' => ['/debug'], 'icon' => 'bug', 'target' => '_blank', 'badge' => ['badgeType' => 'warning', 'message' => 2]],
        ]
    ],
]

Layouts (login)

Use the code in your controller.

$this->layout = '/main-login';

Thx

ColorlibHQ/AdminLTE.

统计信息

  • 总下载量: 88
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-4-Clause
  • 更新时间: 2025-06-26