user(); app(WorkspaceAuditLogger::class)->log( workspace: $this->record, action: 'workspace.updated', actor: $user instanceof User ? $user : null, resourceType: 'workspace', resourceId: (string) $this->record->getKey(), context: [ 'metadata' => [ 'workspace_id' => (int) $this->record->getKey(), 'slug' => (string) $this->record->slug, ], ], ); } }