registerMiddleWares(); } public function loadEvents() { return [ 'operateLog' => [ OperateLogEvent::class ], ]; } public function loadRouteFrom() { // TODO: Implement loadRouteFrom() method. return __DIR__ . DIRECTORY_SEPARATOR . 'route.php'; } protected function registerMiddleWares() { $middleware = $this->app->config->get('middleware'); $middleware['alias']['auth'] = [ AuthTokenMiddleware::class, PermissionsMiddleware::class, RecordOperateMiddleware::class ]; $this->app->config->set($middleware, 'middleware'); } }