user = $user; $this->action = $action; if($action === "delete_membership"){ $this->subject = 'Mitgliedschaft beenden - beantragt'; } } public function build() { $content = __(strtoupper($this->user->account->salutation))." "; $content .= $this->user->account->first_name." ".$this->user->account->last_name."\n"; $content .= $this->user->account->address."\n"; $content .= $this->user->account->zipcode." ".$this->user->account->city."\n"; $content .= $this->user->account->country_id ? $this->user->account->country->de."\n\n" : "\n\n"; if($this->user->account->phone){ $content .= "Telefon: "; $content .= $this->user->account->pre_phone_id ? $this->user->account->pre_phone->phone." " : " "; $content .= $this->user->account->phone; } if($this->user->account->mobil){ $content .= "Mobil: "; $content .= $this->user->account->pre_mobil_id ? $this->user->account->pre_mobil->phone." " : " "; $content .= $this->user->account->mobil; } $content .= "E-Mail: ".$this->user->email; if($this->action === "delete_membership"){ $copy1line = "Infos zum Berater:"."\n"; $button = "zum Berater"; $title = "Ein Berater möchte seine Mitgliedschaft beenden."; } return $this->view('emails.info')->with([ 'url' => route('admin_lead_edit', $this->user->id).'?show=check_lead', 'title' => $title, 'button' => $button, 'copy1line' => $copy1line, 'copy2line' => __('email.copy2line'), 'content' => $content, ]); } }