Wire seller push notifications with FCM, inbox API, and payment milestones.
Deploy Ladill Mini / deploy (push) Successful in 52s
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>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user