26 lines
466 B
PHP
26 lines
466 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\App\Post;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StorePostRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'date' => ['nullable', 'date_format:Y-m-d'],
|
|
'media' => ['nullable', 'array'],
|
|
];
|
|
}
|
|
}
|