|
|
@@ -6,6 +6,7 @@ use Illuminate\Bus\Queueable; |
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue; |
|
|
|
use Illuminate\Mail\Mailable; |
|
|
|
use Illuminate\Queue\SerializesModels; |
|
|
|
use Illuminate\Support\Facades\Log; |
|
|
|
|
|
|
|
use App\Models\Ticket; |
|
|
|
|
|
|
@@ -20,17 +21,18 @@ class SupportTicket extends Mailable |
|
|
|
*/ |
|
|
|
public $name; |
|
|
|
public $email; |
|
|
|
public $message; |
|
|
|
public $user_message; |
|
|
|
public $type; |
|
|
|
public $id; |
|
|
|
|
|
|
|
public function __construct(Ticket $ticket, String $message) |
|
|
|
public function __construct(Ticket $ticket, String $user_message) |
|
|
|
{ |
|
|
|
$this->name = $ticket->user->name; |
|
|
|
$this->email = $ticket->user->email; |
|
|
|
$this->message = $message; |
|
|
|
$this->user_message = $user_message; |
|
|
|
$this->type = $ticket->type; |
|
|
|
$this->id = $ticket->id; |
|
|
|
Log::debug($this->user_message); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -40,8 +42,9 @@ class SupportTicket extends Mailable |
|
|
|
*/ |
|
|
|
public function build() |
|
|
|
{ |
|
|
|
return $this->view('support-ticket') |
|
|
|
->from('donotreply@trendplays.com') |
|
|
|
->subject("Ticket: $this->id, $this->type"); |
|
|
|
$this->view('support-ticket'); |
|
|
|
$this->from('donotreply@trendplays.com'); |
|
|
|
$this->subject("Ticket: $this->id, $this->type"); |
|
|
|
return $this; |
|
|
|
} |
|
|
|
} |