Major additions: - Knowledge base with categories, articles, revisions, and voting - Enhanced ticket system: departments, SLA policies, canned responses, tags, custom fields, satisfaction ratings, internal notes - Multi-currency support with exchange rate sync - Shopping cart and quote system with PDF generation - Affiliate program with referrals, commissions, and payouts - Account credits, credit notes, and debit notes - Staff management with granular role-based permissions - Fraud detection and order risk assessment - ServerHunter SEO integration - Service lifecycle events (suspend/unsuspend/terminate) - Service management panels for VPS, Dedicated, Hosting, and Game servers - Plan lifecycle fields and per-customer overrides - 30+ migrations, 17 factories, 8 feature test suites Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
57 lines
1.6 KiB
PHP
57 lines
1.6 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Notifications;
|
|
|
|
use App\Models\Quote;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class QuoteSentNotification extends Notification implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
public function __construct(
|
|
public Quote $quote,
|
|
public string $signedUrl,
|
|
) {}
|
|
|
|
/** @return array<int, string> */
|
|
public function via(object $notifiable): array
|
|
{
|
|
return ['mail'];
|
|
}
|
|
|
|
public function toMail(object $notifiable): MailMessage
|
|
{
|
|
$total = number_format((float) $this->quote->total, 2);
|
|
$currency = strtoupper($this->quote->currency);
|
|
$recipientName = $this->quote->getRecipientName() ?? 'there';
|
|
$validUntil = $this->quote->valid_until?->format('M d, Y');
|
|
|
|
$message = (new MailMessage)
|
|
->subject("Quote {$this->quote->number} from EZSCALE")
|
|
->greeting("Hello {$recipientName}!")
|
|
->line("We've prepared a quote for you.")
|
|
->line("**Quote #:** {$this->quote->number}")
|
|
->line("**Total:** {$currency} {$total}");
|
|
|
|
if ($validUntil) {
|
|
$message->line("**Valid Until:** {$validUntil}");
|
|
}
|
|
|
|
if ($this->quote->notes) {
|
|
$message->line("**Notes:** {$this->quote->notes}");
|
|
}
|
|
|
|
$message->action('View Quote', $this->signedUrl)
|
|
->line('You can accept or decline this quote using the link above.')
|
|
->line('Thank you for considering EZSCALE!');
|
|
|
|
return $message;
|
|
}
|
|
}
|