type = strtolower(class_basename($this->profile)); // $this->onlineStatus = $this->getOnlineStatus(); $this->location = $this->getLocation($this->profile); $this->age = $this->getAge($this->profile) ? ' (' . $this->getAge($this->profile) . ')' : ''; $this->phone = $this->getPhone($this->profile); $this->lastLoginAt = $this->getLastLogin($this->profile); $this->accountsTotals = $this->getAccountsTotals($this->profile); $this->lastExchangeAt = $this->getLastExchangeAt($this->accountsTotals, $this->profile); $this->registeredSince = $this->getRegisteredSince($this->profile); $this->profile->languages = $this->getLanguages($this->profile); $this->profile->lang_preference = $this->getLangPreference($this->profile); $this->skills = $this->getSkills($this->profile); $this->socials = $this->getSocials($this->profile); } public function toggleAboutText() { $this->showAboutFullText = !$this->showAboutFullText; } /** * Redirects to the payment page to this user. * * @return \Illuminate\Http\RedirectResponse */ public function payButton() { if ($this->profile->isRemoved()) { return; } return redirect()->route('pay-to-name', ['name' => $this->profile->name]); } /** * Start a conversation with this user. */ public function createConversation() { if ($this->profile->isRemoved()) { return ; } $recipient = $this->profile; $conversation = getActiveProfile()->createConversationWith($recipient); return redirect()->route('chat', ['conversation' => $conversation->id]); } /** * Render the view for the ProfileUser Show component. * * @return \Illuminate\Contracts\View\View */ public function render() { return view('livewire.profile.show'); } }