params = $params; } /** * @param Builder $model * @param RepositoryInterface $repository * @return mixed|void */ public function apply( $model, RepositoryInterface $repository ) { if (!empty($this->params['name'])) { $model = $model->where('name', 'LIKE', '%'.$this->params['name'].'%'); } if (!empty($this->params['uid'])) { $model = $model->where('uid', $this->params['uid']); } return $model; } }