params = $params; } public function apply($model, RepositoryInterface $repository) { if (!empty($this->params['parent_uid'])) { $model = $model->where('parent_uid', $this->params['parent_uid']); } if (!empty($this->params['doings_end_time']) && checkmydate($this->params['doings_end_time'])) { $model = $model->where('created_at', '<=', $this->params['doings_end_time'] . ' 00:00:00'); } return $model; } }