search = $search; } /** * @param $model * @param RepositoryInterface $repository * @return mixed */ public function apply($model, Repository $repository) { if(isset($this->search['deleted_at']) && $this->search['deleted_at']) { $model = $model->where('deleted_at',$this->search['deleted_at']); } return $model; } }