<?php
namespace App\Mail;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class OrderCompletedMail extends Mailable {
    use SerializesModels;
    public $order; public $role;
    
    public function __construct($order, $role) { 
        $this->order = $order; 
        $this->role = $role; 
    }
    
    public function build() {
        $subject = __('Order Completed - #:order', ['order' => $this->order->order_number]);
        return $this->subject($subject)->view('emails.orders.completed');
    }
}