data = $data; $this->recipientType = $recipientType; } /** * Build the message. * * @return $this */ public function build() { $address = 'support.rapport@stratawiz.com'; $name = 'GNP Support Team'; $status = $this->data['status']; $orderNo = $this->data['order_no'] ?? 'N/A'; $subject = "Order Status Update: {$status} - Order #{$orderNo}"; // Choose template based on recipient type $view = 'email.neblogistic_status_update'; return $this->view($view) ->from($address, $name) ->replyTo($address, $name) ->subject($subject) ->with([ 'data' => $this->data, 'recipientType' => $this->recipientType ]); } }