Files
site/app/Http/Requests/TextFormRequest.php
2025-04-21 16:03:20 +02:00

32 lines
577 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class TextFormRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'title' => ['nullable', 'string', 'max:255'],
'body' => ['required', 'string'],
];
}
}