home
/
forge
/
roadtovirtuosity.com
/
app
/
Mail
➕ New
📤 Upload
✎ Editing:
TeacherTypeNotification.php
← Back
<?php namespace App\Mail; use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; class TeacherTypeNotification extends Mailable { use Queueable, SerializesModels; private $teacherType, $email, $student_type_admin, $name; /** * Create a new message instance. * * @return void */ public function __construct($data) { $this->teacherType = $data['teacher_type']; $this->email = $data['email']; $this->student_type_admin = isset($data['student_type_admin']) ? $data['student_type_admin'] : null; $this->name = $data['name']; } /** * Build the message. * * @return $this */ public function build() { $student_type_admin = null; $subject = 'Teacher Type Notification'; $toAddress = config('register.email.type-student'); $message = 'You have selected teacher type ' . $this->teacherType; $teacherType = $this->teacherType == 1 ? 'free Account' : (($this->teacherType == 2) ? 'free Account - but I have my own piano teacher' : (($this->teacherType == 3) ? 'Student Account - Pay by the hour. No commitment to weekly lessons' : (($this->teacherType == 4) ? 'Student Account - I’m looking for a teacher' : null))); if($this->student_type_admin != null) { $student_type_admin = $this->student_type_admin == 1 ? 'Traditional' : (($this->student_type_admin == 2) ? 'Lessons by Text and Video only' : (($this->student_type_admin == 3) ? 'Evaluation only.' : null)); } if ($this->teacherType != null) { return $this->from($this->email) ->to($toAddress) ->subject($subject) ->view('emails.type-student', ['teacherType' => $teacherType, 'student_type_admin' => $student_type_admin, 'name' => $this->name, 'email' => $this->email]); } } }
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel