From 44ed0b9788389f4793e325e2dd63ff07112b72a0 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Tue, 1 Sep 2020 07:58:36 +0800 Subject: [PATCH] =?UTF-8?q?update:=E8=B0=83=E6=95=B4=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../database/migrations/20200830025329_update_roles.php | 2 +- catch/permissions/model/Department.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/catch/permissions/database/migrations/20200830025329_update_roles.php b/catch/permissions/database/migrations/20200830025329_update_roles.php index ddeaed1..28face9 100644 --- a/catch/permissions/database/migrations/20200830025329_update_roles.php +++ b/catch/permissions/database/migrations/20200830025329_update_roles.php @@ -31,7 +31,7 @@ class UpdateRoles extends Migrator if ($this->hasTable('roles')) { $table = $this->table('roles'); - $table->addColumn('identifies', 'string', [ + $table->addColumn('identify', 'string', [ 'limit' => 20, 'default' => 1, 'comment' => '角色的标识,用英文表示,用于后台路由权限', diff --git a/catch/permissions/model/Department.php b/catch/permissions/model/Department.php index 0dd0ddd..7c84adc 100644 --- a/catch/permissions/model/Department.php +++ b/catch/permissions/model/Department.php @@ -35,9 +35,7 @@ class Department extends CatchModel */ public function getList(): array { - return $this->withoutField(['department_name']) - ->addFields(['department_name as title']) - ->catchSearch() + return $this->catchSearch() ->catchOrder() ->select()->toArray(); }