platform/admin/app/Notifications/RegistrationNotification.php
/**
     * Get the mail representation of the notification.
     *
     * @param mixed $notifiable
     * @return \Illuminate\Notifications\Messages\MailMessage
     */
Get the mail representation of the notification.
@param mixed $notifiable
@return \Illuminate\Notifications\Messages\MailMessage
Get the mail representation of the notification . @param mixed $notifiable @return \ Illuminate \ Notifications \ Messages \ MailMessage
public function toMail($notifiable)
    {
        $total = intval($this->data['ticket']->cost);
        if (!empty($this->data['sessions'])) {
            foreach ($this->data['sessions'] as $session) {
                if (intval($session->sessionType->cost) > 0) $total += intval($session->sessionType->cost);
            }
        }
        $attendeeMail = $this->data['attendee']->email;
        if (!empty($attendeeMail)) {
            Mail::to($attendeeMail)->send(new RegistrationMail([
                'data' => $this->data,
                'total' => $total
            ]));
        }
        return (new MailMessage)
            ->view('admin::mail.registration', [
                'data' => $this->data,
                'total' => $total
            ])
            ->subject('New Registration - Event Booking Platform');
    }
public function toMail ( $ notifiable ) { $ total = intval ( $ this -> data [ 'ticket' ] -> cost ) ; if ( ! empty ( $ this -> data [ 'sessions' ] ) ) { foreach ( $ this -> data [ 'sessions' ] as $ session ) { if ( intval ( $ session -> sessionType -> cost ) > 0 ) $ total += intval ( $ session -> sessionType -> cost ) ; } } $ attendeeMail = $ this -> data [ 'attendee' ] -> email ; if ( ! empty ( $ attendeeMail ) ) { Mail :: to ( $ attendeeMail ) -> send ( new RegistrationMail ( [ 'data' => $ this -> data , 'total' => $ total ] ) ) ; } return ( new MailMessage ) -> view ( 'admin::mail.registration' , [ 'data' => $ this -> data , 'total' => $ total ] ) -> subject ( 'New Registration - Event Booking Platform' ) ; }
Get the mail representation of the notification.
Get the mail representation of the notification .