request = $request; } /** * @inheritDoc */ public function apply($model, RepositoryInterface $repository) { if ($this->request->filled('id')) { $model = $model->where('id', $this->request->get('id')); } //管理员 // if (is_admin_login()) { // $admin = login_admin(); // switch ($admin->type) { // case Role::Merchants: // $model = $model->where('admin_id', $admin->id); // break; // } // } return parent::apply($model, $repository); } }