field = $field; $this->array = $array; } /** * @param $model * @param RepositoryInterface $repository * @return mixed */ public function apply($model, Repository $repository) { $model = $model->whereIn($this->field,$this->array); return $model; } }