<?php namespace app\abutment\controller; use app\abutment\middleware\homeMiddleware; use app\BaseController; //页面控制器base class HomeBaseController extends BaseController { //使用的中间件 protected $middleware=[ homeMiddleware::class ]; }