route('user'); return [ 'name' => ['required', 'string', 'max:255'], 'email' => ['required', 'email', 'max:255', Rule::unique('users', 'email')->ignore($user)], 'password' => ['nullable', 'string', 'min:8', 'confirmed'], 'role' => ['required', Rule::in(['admin', 'manager', 'technician', 'client'])], 'department_id' => ['nullable', 'exists:departments,id'], 'phone' => ['nullable', 'string', 'max:32'], 'is_active' => ['nullable', 'boolean'], ]; } }