<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class StorePostRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'title' => ['required', 'string', 'max:255'],
            'content' => ['required'],
            'location' => ['nullable'],
            'files' => ['nullable', 'mimes:jpg,jpeg,png', 'max:20000'],
            'tags' => ['nullable'],
        ];
    }

    public function authorize(): bool
    {
        return true;
    }
}
