Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| IndexParameterRequest | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| rules | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Http\Requests\v2\Parameter; |
| 4 | |
| 5 | use App\Http\Requests\v2\Parameter\Concerns\AuthorizesVengresoAdmin; |
| 6 | use Illuminate\Foundation\Http\FormRequest; |
| 7 | |
| 8 | /** |
| 9 | * Request for listing parameters. |
| 10 | * |
| 11 | * @property string|null $filter Optional search filter for parameter names |
| 12 | * @property int|null $per_page Number of items per page (default: 15, max: 100) |
| 13 | * @property int|null $page Current page number |
| 14 | */ |
| 15 | class IndexParameterRequest extends FormRequest |
| 16 | { |
| 17 | use AuthorizesVengresoAdmin; |
| 18 | |
| 19 | /** |
| 20 | * Get the validation rules that apply to the request. |
| 21 | * |
| 22 | * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
| 23 | */ |
| 24 | public function rules(): array |
| 25 | { |
| 26 | return [ |
| 27 | 'filter' => 'sometimes|string|max:255', |
| 28 | 'per_page' => 'sometimes|integer|min:1|max:100', |
| 29 | 'page' => 'sometimes|integer|min:1', |
| 30 | ]; |
| 31 | } |
| 32 | } |