Deploy Ladill Mini / deploy (push) Successful in 52s
Sellers get instant payment alerts on Android; withdrawals respect payout prefs. Co-authored-by: Cursor <cursoragent@cursor.com>
43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications\Mini;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class MiniAlertNotification extends Notification implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
/**
|
|
* @param array<string, mixed> $extra
|
|
*/
|
|
public function __construct(
|
|
private readonly string $title,
|
|
private readonly string $message,
|
|
private readonly string $icon,
|
|
private readonly ?string $url,
|
|
private readonly string $milestone,
|
|
private readonly array $extra = [],
|
|
) {}
|
|
|
|
/** @return list<string> */
|
|
public function via(object $notifiable): array
|
|
{
|
|
return ['database'];
|
|
}
|
|
|
|
/** @return array<string, mixed> */
|
|
public function toArray(object $notifiable): array
|
|
{
|
|
return array_merge([
|
|
'title' => $this->title,
|
|
'message' => $this->message,
|
|
'icon' => $this->icon,
|
|
'url' => $this->url,
|
|
'milestone' => $this->milestone,
|
|
], $this->extra);
|
|
}
|
|
}
|