Files
movies/app/Http/Requests/Forum/TopicRequest.php
T

30 lines
630 B
PHP
Raw Normal View History

2025-02-10 01:58:12 +02:00
<?php
namespace App\Http\Requests\Forum;
use Illuminate\Foundation\Http\FormRequest;
class TopicRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
2025-02-16 21:11:07 +02:00
return true;
2025-02-10 01:58:12 +02:00
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
2025-02-16 21:11:07 +02:00
'name' => 'required|min:2|max:255',
'content' => 'required|min:2',
2025-02-10 01:58:12 +02:00
];
}
}