<?php

namespace App\Http\Requests\Admin\Language;

class UpdateLanguageRequest extends StoreLanguageRequest
{
    public function rules(): array
    {
        $rules = parent::rules();
        $rules['code'] = ['required', 'string', 'max:5', 'unique:languages,code,' . $this->route('language')->id];

        return $rules;
    }
}
