*/ protected array $extraAttributes = []; /** * @return array */ protected function getExtraAttributes(): array { $attributes = $this->extraAttributes; if (! in_array($this->getLive(), [null, '', '0'], true)) { $attributes['wire:poll.'.$this->getLive()] = '$dispatch(\'$refresh\')'; } return $attributes; } public function getExtraAttributesBag(): ComponentAttributeBag { return new ComponentAttributeBag($this->getExtraAttributes()); } public function getLive(): ?string { return $this->live; } /** * @return array */ public function getWidgets(): array { return []; } protected function getUser(): User { /** @var User $user */ $user = auth()->user(); return $user; } }