35 lines
689 B
PHP
35 lines
689 B
PHP
<?php
|
||
|
||
namespace App\Http\Requests\Comment;
|
||
|
||
use Illuminate\Foundation\Http\FormRequest;
|
||
|
||
class UpdateCommentRequest extends FormRequest
|
||
{
|
||
public function authorize(): bool
|
||
{
|
||
return true;
|
||
}
|
||
|
||
/**
|
||
* @return array<string, array<int, string>>
|
||
*/
|
||
public function rules(): array
|
||
{
|
||
return [
|
||
'is_approved' => ['sometimes', 'boolean'],
|
||
'admin_reply' => ['nullable', 'string', 'max:1000'],
|
||
];
|
||
}
|
||
|
||
/**
|
||
* @return array<string, string>
|
||
*/
|
||
public function messages(): array
|
||
{
|
||
return [
|
||
'admin_reply.max' => 'Admin yanıtı en fazla 1000 karakter olabilir.',
|
||
];
|
||
}
|
||
}
|