/
melnik.58
/
cube.example
Обзор
Документация
Войти
/
melnik.58
/
cube.example
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
app/Http/Requests/CubeRequest.php
41 строка
1 KB
Мельник Екатерина Викторовна
Базовый функционал
28 янв 2025, 11:50
28 янв 2025, 11:50
526d797
Код
Авторство
О чём код?
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class CubeRequest extends FormRequest { /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; } /** * Get the validation rules that apply to the request. * * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> */ public function rules(): array { return [ 'side' => ['required', 'numeric', 'min:0'] ]; } /** * Get the error messages for the defined validation rules. * * @return array<string, string> */ public function messages(): array { return [ 'side.required' => 'Необходимо ввести длинну стороны', 'side.numeric' => 'Необходтимо ввести число', 'side.min' => 'Длина стороны должны быть больше :min', ]; } }