ldc-legaulois/app/Http/Requests/Club/Bourse/SearchCustomerCollectionRequest.php

34 lines
804 B
PHP
Raw Permalink Normal View History

2024-07-11 15:46:43 +02:00
<?php
namespace App\Http\Requests\Club\Bourse;
class SearchCustomerCollectionRequest extends CustomerCollectionRequest
{
/**
* Prepare the data for validation.
*/
public function prepareForValidation(): void
{
$this->merge([
2024-09-24 16:48:16 +02:00
'pseudo' => $this->string('pseudo'),
2026-09-25 16:25:31 +02:00
'departaimant' => $this->string('departaimant'),
2024-07-11 15:46:43 +02:00
]);
parent::prepareForValidation();
}
/**
* Get the validation rules that apply to the request.
*/
public function rules(): array
2024-07-11 15:46:43 +02:00
{
return array_merge(
parent::rules(),
[
2024-09-24 16:48:16 +02:00
'pseudo' => 'nullable',
2024-07-11 15:46:43 +02:00
'departaimant' => 'nullable',
2026-09-25 16:25:31 +02:00
'page' => 'required|numeric|min:1',
2024-07-11 15:46:43 +02:00
]
);
}
}