Files
ProxyPanel/app/Notifications/TicketCreated.php
2021-01-18 02:24:41 -05:00

46 lines
1.0 KiB
PHP

<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class TicketCreated extends Notification implements ShouldQueue
{
use Queueable;
private $title;
private $content;
private $url;
public function __construct($title, $content, $url)
{
$this->title = $title;
$this->content = $content;
$this->url = $url;
}
public function via($notifiable)
{
return sysConfig('ticket_created_notification');
}
public function toMail($notifiable)
{
return (new MailMessage)
->subject(trans('notification.new_ticket', ['title' => $this->title]))
->line(trans('notification.ticket_content'))
->line($this->content)
->action(trans('notification.view_ticket'), $this->url);
}
public function toArray($notifiable)
{
return [
//
];
}
}