request = $request; } /** * @param $model * @param RepositoryInterface $repository * * @return mixed */ public function apply($model, RepositoryInterface $repository) { // this is a Example //if ($this->request->filled('name')) { // $model = $model->where('name', '=', $this->request->get('name')); //} return $model; } }