cszchen 2016-05-31 17:56:14 36263次浏览 3条评论 6 4 0

扩展子yii2-bootstrap,快速搭建一个后台管理面板。

controllers/SiteController.php

class SiteController extends \yii\web\Controller
 {
    public $layout = '@vendor/cszchen/alte/veiws/main-layout.php';
    
    public function actionIndex()
    {
        return $this->render('index');
    }
 }

views/site/index.php

use cszchen\alte\widgets\Box;

$this->title = "Title here!";
Box::begin([
  'type' => 'primary',
  'title' => 'Box title',
  'refreshUrl' => '/userinfo',
  'tools' => ['refresh', 'collapse', 'remove'],
  'collapsed' => false
]);
echo "cszchen/alte";
Box::end();

screen

源码:https://github.com/cartmanchen/yii2-bootstrap-AdminLTE

觉得很赞
  • 评论于 2016-06-02 14:30 举报

    这样的一个界面,几分钟就能搭起来了

    2 条回复
    评论于 2016-06-05 00:30 回复

    怎么安装 啊?

    评论于 2016-06-06 16:41 回复

    composer require "cszchen/alte": ">=2.0.0"

  • 评论于 2016-08-05 16:39 举报
    View not Found – yii\base\ViewNotFoundException
    
    The view file does not exist: /home/wwwroot/default/helloyii/vendor/cszchen/alte/veiws/main-layout.php
    

    一直报这个错,但肯定是有这个文件的

    2 条回复
    评论于 2016-08-10 19:26 回复

    是什么操作系统呢,如果是linux,有没有读权限

    评论于 2016-08-12 16:30 回复

    楼主写错了,安装后视图目录是views,楼主写的是veiws,我没细看,直接复制上去了。

  • 评论于 2016-08-12 16:31 举报

    图片图片图片

您需要登录后才可以评论。登录 | 立即注册