Files
construprogress/app/Notifications/IssueAssignedNotification.php
T

31 lines
726 B
PHP
Raw Normal View History

<?php
namespace App\Notifications;
use App\Models\Issue;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
class IssueAssignedNotification extends Notification
{
use Queueable;
public function __construct(public Issue $issue) {}
public function via($notifiable): array
{
return ['database'];
}
public function toArray($notifiable): array
{
return [
'type' => 'issue_assigned',
'issue_id' => $this->issue->id,
'project_id' => $this->issue->project_id,
'priority' => $this->issue->priority,
'message' => "Se te ha asignado la incidencia '{$this->issue->title}'",
];
}
}