<?php

namespace App\Http\Requests\Admin\QrSetting;

use Illuminate\Foundation\Http\FormRequest;

class UpdateQrSettingRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'key'       => 'required|string|max:255|unique:qr_settings,key,' . $this->route('qr_setting')->id,
            'value'     => 'required|string|max:1000',
            'is_active' => 'nullable|boolean',
        ];
    }
}
