LaravelTest
28 строк · 575.0 Байт
1<?php
2
3namespace App\Http\Requests;
4
5use Illuminate\Foundation\Http\FormRequest;
6
7class UpdateRequest extends FormRequest
8{
9/**
10* Determine if the user is authorized to make this request.
11*/
12public function authorize(): bool
13{
14return true;
15}
16
17/**
18* Get the validation rules that apply to the request.
19*
20* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
21*/
22public function rules(): array
23{
24return [
25'title' => 'required|string',
26];
27}
28}