Deploy Ladill Mini / deploy (push) Successful in 23s
Staff-facing counter register at pos.ladill.com with catalog cart, cash and MoMo/card checkout via Ladill Pay, CRM timeline/import, invoice prefill, and Merchant catalog import. Co-authored-by: Cursor <cursoragent@cursor.com>
55 lines
1.6 KiB
PHP
55 lines
1.6 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 HostingDeveloperAddedNotification extends Notification implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
/**
|
|
* @param array<int, string> $accountLabels
|
|
*/
|
|
public function __construct(
|
|
private string $ownerName,
|
|
private array $accountLabels,
|
|
private ?string $setupUrl = null
|
|
) {}
|
|
|
|
public function via($notifiable): array
|
|
{
|
|
return ['mail', 'database'];
|
|
}
|
|
|
|
public function toMail($notifiable): MailMessage
|
|
{
|
|
return (new MailMessage())
|
|
->subject('You were added to a Ladill hosting team')
|
|
->view('mail.notifications.hosting-developer-added', [
|
|
'developer' => $notifiable,
|
|
'ownerName' => $this->ownerName,
|
|
'accountLabels' => $this->accountLabels,
|
|
'setupUrl' => $this->setupUrl,
|
|
'loginUrl' => route('login'),
|
|
'dashboardUrl' => route('dashboard'),
|
|
]);
|
|
}
|
|
|
|
public function toArray($notifiable): array
|
|
{
|
|
$accountCount = count($this->accountLabels);
|
|
$scope = $accountCount === 1 ? $this->accountLabels[0] : $accountCount.' hosting accounts';
|
|
|
|
return [
|
|
'title' => 'Hosting team access granted',
|
|
'message' => "You were added by {$this->ownerName} to {$scope}.",
|
|
'icon' => 'hosting',
|
|
'url' => route('hosting.single-domain'),
|
|
];
|
|
}
|
|
}
|