OrderInvoice.php 650 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace app\Mail;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Mail\Mailable;
  5. use Illuminate\Queue\SerializesModels;
  6. use Illuminate\Contracts\Queue\ShouldQueue;
  7. class OrderInvoice extends Mailable
  8. {
  9. use Queueable, SerializesModels;
  10. protected $data = [];
  11. /**
  12. * Create a new message instance.
  13. *
  14. * @return void
  15. */
  16. public function __construct($imagePath)
  17. {
  18. $this->data['imagePath'] = $imagePath;
  19. }
  20. /**
  21. * Build the message.
  22. *
  23. * @return $this
  24. */
  25. public function build()
  26. {
  27. return $this->view('emails.orderInvoice', ['data' =>$this->data]);
  28. }
  29. }