/** * Get the validation rules that apply to the request. * * @return array */ public function rules() { /** @var \Arcanesoft\Auth\Models\Role $role */ $role = $this->route('auth_role'); return array_merge(parent::rules(), ['slug' => "required|min:3|unique:roles,slug,{$role->id}"]); }
/** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return array_merge(parent::rules(), ['slug' => 'required|min:3|unique:roles,slug']); }