states, and pulls data from the authenticated /api/v1/tenant/packages endpoint.
(resources/js/admin/pages/EventFormPage.tsx, resources/js/admin/api.ts)
- Harden tenant-admin auth flow: prevent PKCE state loss, scope out StrictMode double-processing, add SPA
routes for /event-admin/login and /event-admin/logout, and tighten token/session clearing semantics (resources/js/admin/auth/{context,tokens}.tsx, resources/js/admin/pages/{AuthCallbackPage,LogoutPage}.tsx,
resources/js/admin/router.tsx, routes/web.php)
53 lines
1.2 KiB
PHP
53 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Models\PackagePurchase;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class PurchaseConfirmation extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public function __construct(public PackagePurchase $purchase)
|
|
{
|
|
//
|
|
}
|
|
|
|
public function envelope(): Envelope
|
|
{
|
|
return new Envelope(
|
|
subject: __('emails.purchase.subject', ['package' => $this->localizedPackageName()]),
|
|
);
|
|
}
|
|
|
|
public function content(): Content
|
|
{
|
|
return new Content(
|
|
view: 'emails.purchase',
|
|
with: [
|
|
'purchase' => $this->purchase,
|
|
'user' => $this->purchase->tenant->user,
|
|
'package' => $this->purchase->package,
|
|
'packageName' => $this->localizedPackageName(),
|
|
],
|
|
);
|
|
}
|
|
|
|
public function attachments(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
private function localizedPackageName(): string
|
|
{
|
|
$locale = $this->locale ?? app()->getLocale();
|
|
|
|
return optional($this->purchase->package)->getNameForLocale($locale) ?? '';
|
|
}
|
|
}
|