merge(['page' => (int) $this->page ?: 1]); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { $queryKey = trans('front.search.query'); $pageKey = trans('front.search.page'); return [ $queryKey => 'required|string|between:3,255', $pageKey => 'required|integer|min:1', ]; } }