| Total Complexity | 2 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class AbsenceNotification extends Mailable |
||
| 14 | { |
||
| 15 | use Queueable; |
||
| 16 | use SerializesModels; |
||
|
|
|||
| 17 | |||
| 18 | public $enrollment; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Create a new message instance. |
||
| 22 | * |
||
| 23 | * @return void |
||
| 24 | */ |
||
| 25 | public function __construct(public Event $event, public User $student) |
||
| 26 | { |
||
| 27 | $nstudent = Student::where('id', $student->id)->first(); |
||
| 28 | $this->enrollment = Enrollment::where('student_id', $nstudent->id)->where('course_id', $event->course_id)->first(); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Build the message. |
||
| 33 | * |
||
| 34 | * @return $this |
||
| 35 | */ |
||
| 36 | public function build() |
||
| 41 | } |
||
| 42 | } |
||
| 43 |