Files
animethemes-server/app/Notifications/ExternalProfileSyncedNotification.php
T
2025-08-27 03:47:27 -03:00

46 lines
1003 B
PHP

<?php
declare(strict_types=1);
namespace App\Notifications;
use App\Models\List\ExternalProfile;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Notifications\Notification;
class ExternalProfileSyncedNotification extends Notification implements Arrayable, ShouldQueue
{
use Queueable;
public function __construct(
public ExternalProfile $profile,
) {}
/**
* Get the notification's delivery channels.
*
* @return array
*
* @noinspection PhpUnusedParameterInspection
*/
public function via($notifiable): array
{
return ['database'];
}
/**
* Get the array representation of the notification.
*
* @return array<string, mixed>
*/
public function toArray(): array
{
return [
'profileId' => $this->profile->getKey(),
'profileName' => $this->profile->getName(),
];
}
}