|string> */ public function rules(): array { return [ 'perPage' => ['nullable', 'integer', 'min:1', 'max:100'], ]; } protected function passedValidation(): void { $this->merge([ 'perPage' => $this->perPage ?: 50, ]); } }