catchSearch() ->order('sort', 'desc') ->order('id', 'desc') ->select() ->toArray(); } public function roles(): \think\model\relation\BelongsToMany { return $this->belongsToMany(Roles::class, 'role_has_permissions', 'role_id', 'permission_id'); } }