ContactAdmin.php 730 B

12345678910111213141516171819202122232425262728293031323334353637
  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. use App\Contact;
  8. class ContactAdmin extends Mailable
  9. {
  10. use Queueable, SerializesModels;
  11. protected $contact;
  12. /**
  13. * Create a new message instance.
  14. *
  15. * @return void
  16. */
  17. public function __construct(Contact $contact)
  18. {
  19. $this->contact = $contact;
  20. }
  21. /**
  22. * Build the message.
  23. *
  24. * @return $this
  25. */
  26. public function build()
  27. {
  28. $contact = $this->contact;
  29. return $this->subject('New Support Message')->markdown('emails.contact.admin')->with(compact('contact'));
  30. }
  31. }