AdminFaultController.php 740 字节
<?php
/**
 * Created by PhpStorm.
 * User: ruidiudiu
 * Date: 2018/11/23
 * Time: 11:57
 */

namespace app\portal\controller;


use app\portal\model\EquipmentModel;
use cmf\controller\AdminBaseController;
use think\Db;

/**
 * Class AdminFaultController
 * @package app\portal\controller
 * @adminMenuRoot(
 *     'name'   =>'故障统计',
 *     'action' =>'index',
 *     'parent' =>'',
 *     'display'=> true,
 *     'order'  => 1,
 *     'icon'   =>'th',
 *     'remark' =>'故障统计'
 * )
 */
class AdminFaultController extends AdminBaseController{

    public function index(){
        $data=Db::name('fault')->order('create_time','desc')->paginate(10);
        $this->assign('data',$data);
        return $this->fetch();
    }
}