params = $params; } public function apply($model, Repository $repository) { if (!empty($this->params['app_uid'])) { $model = $model->where('app_uid', $this->params['app_uid']); } if (!empty($this->params['deduction_type'])) { $model = $model->where('deduction_type', $this->params['deduction_type']); } return $model; } }