authenticatedUser = Auth::user(); } /** * @return TModelRelated&Nameable */ public function getRelated(): Model&Nameable { return $this->related; } /** * @return TModelForeign&Nameable */ public function getForeign(): Model&Nameable { return $this->foreign; } protected function getAuthenticatedUser(): ?User { return $this->authenticatedUser; } /** * @return array> */ protected function getUserFooter(): array { if (is_null($this->getAuthenticatedUser())) { return []; } return [ 'footer' => [ 'text' => $this->getAuthenticatedUser()->getName(), 'icon_url' => $this->getAuthenticatedUser()->getFilamentAvatarUrl(), ], ]; } public function getDiscordChannel(): string { return Config::get(ServiceConstants::DB_UPDATES_DISCORD_CHANNEL_QUALIFIED); } public function shouldSendDiscordMessage(): bool { return true; } abstract protected function getDiscordMessageDescription(): string; }