24 خطوط
488 B
PHP
24 خطوط
488 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StoreCommentRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'body' => 'required|string',
|
|
'commentable_id' => 'required|integer',
|
|
'commentable_type' => 'required|string',
|
|
'mentioned_user_id' => 'nullable|exists:users,id',
|
|
];
|
|
}
|
|
}
|