This commit is contained in:
2025-02-16 21:11:07 +02:00
parent 87bbfc33d3
commit e8d7e6a1c4
253 changed files with 3879 additions and 72 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Http\Requests\Forum;
use Illuminate\Foundation\Http\FormRequest;
class PostRequest 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 [
'content' => 'required|min:2'
];
}
}
+3 -2
View File
@@ -11,7 +11,7 @@ class TopicRequest extends FormRequest
*/
public function authorize(): bool
{
return false;
return true;
}
/**
@@ -22,7 +22,8 @@ class TopicRequest extends FormRequest
public function rules(): array
{
return [
//
'name' => 'required|min:2|max:255',
'content' => 'required|min:2',
];
}
}