currentOperator()) { return; } app(SessionRegistry::class)->end(self::GUARD, (int) $operator->getKey(), $uuid); $this->dispatch('notify', message: __('sessions.ended')); } /** Raised by the confirmation modal (R23), never called from the markup. */ #[On('sessions-end-others-confirmed')] public function endOthers(): void { if (! $operator = $this->currentOperator()) { return; } $registry = app(SessionRegistry::class); $count = $registry->endOthers(self::GUARD, (int) $operator->getKey(), $registry->currentUuid()); $this->dispatch('notify', message: __('sessions.ended_others', ['n' => $count])); } public function render() { $operator = $this->currentOperator(); $registry = app(SessionRegistry::class); $current = $registry->currentUuid(); return view('livewire.sessions', [ 'sessions' => $operator ? $registry->for(self::GUARD, (int) $operator->getKey(), $current) : collect(), 'confirmComponent' => 'admin.confirm-end-other-sessions', ]); } }