AuctionBidMailManager.php 902 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace App\Mail;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Contracts\Queue\ShouldQueue;
  5. use Illuminate\Mail\Mailable;
  6. use Illuminate\Queue\SerializesModels;
  7. class AuctionBidMailManager extends Mailable
  8. {
  9. use Queueable, SerializesModels;
  10. /**
  11. * Create a new message instance.
  12. *
  13. * @return void
  14. */
  15. public $array;
  16. public function __construct($array)
  17. {
  18. $this->array = $array;
  19. }
  20. /**
  21. * Build the message.
  22. *
  23. * @return $this
  24. */
  25. public function build()
  26. {
  27. return $this->view('emails.auction_bid')
  28. ->from($this->array['from'], env('MAIL_FROM_NAME'))
  29. ->subject($this->array['subject'])
  30. ->with([
  31. 'content' => $this->array['content'],
  32. 'link' => $this->array['link'],
  33. ]);
  34. }
  35. }