25 lines
No EOL
518 B
PHP
25 lines
No EOL
518 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\Post;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdatePostRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'title' => 'sometimes|string|max:255',
|
|
'content' => 'sometimes|string',
|
|
'category_id' => 'nullable|exists:categories,id',
|
|
'summary' => 'nullable|string|max:500',
|
|
];
|
|
}
|
|
}
|