My SMM panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SupportTicket.php 915 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. use App\Models\Ticket;
  8. class SupportTicket extends Mailable
  9. {
  10. use Queueable, SerializesModels;
  11. /**
  12. * Create a new message instance.
  13. *
  14. * @return void
  15. */
  16. public $name;
  17. public $email;
  18. public $message;
  19. public $type;
  20. public $id;
  21. public function __construct(Ticket $ticket, String $message)
  22. {
  23. $this->name = $ticket->user->name;
  24. $this->email = $ticket->user->email;
  25. $this->message = $message;
  26. $this->type = $ticket->type;
  27. $this->id = $ticket->id;
  28. }
  29. /**
  30. * Build the message.
  31. *
  32. * @return $this
  33. */
  34. public function build()
  35. {
  36. return $this->view('support-ticket')
  37. ->from('donotreply@trendplays.com')
  38. ->subject("Ticket: $this->id, $this->type");
  39. }
  40. }