<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class StoreBannerRequest extends FormRequest
{
    public function authorize(): bool
    {
        return auth()->check();
    }

    public function rules(): array
    {
        return [
            'pagename' => ['required', 'string', 'max:200', Rule::unique('bannerimages', 'bannrename')],
            'photoid' => ['nullable', 'integer'],
        ];
    }
}
