<?php

namespace App\Http\Requests\Admin\Role;

class UpdateRoleRequest extends StoreRoleRequest
{
    public function rules(): array
    {
        $rules = parent::rules();
        $rules['name'] = ['required', 'string', 'max:255', 'unique:roles,name,' . $this->route('role')->id];

        return $rules;
    }
}
