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)
61 lines
1.4 KiB
PHP
61 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Models\Package;
|
|
use App\Models\User;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class AbandonedCheckout extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public function __construct(
|
|
public User $user,
|
|
public Package $package,
|
|
public string $timing,
|
|
public string $resumeUrl
|
|
) {
|
|
//
|
|
}
|
|
|
|
public function envelope(): Envelope
|
|
{
|
|
return new Envelope(
|
|
subject: __('emails.abandoned_checkout.subject_' . $this->timing, [
|
|
'package' => $this->localizedPackageName(),
|
|
]),
|
|
);
|
|
}
|
|
|
|
public function content(): Content
|
|
{
|
|
return new Content(
|
|
view: 'emails.abandoned-checkout',
|
|
with: [
|
|
'user' => $this->user,
|
|
'package' => $this->package,
|
|
'packageName' => $this->localizedPackageName(),
|
|
'timing' => $this->timing,
|
|
'resumeUrl' => $this->resumeUrl,
|
|
],
|
|
);
|
|
}
|
|
|
|
public function attachments(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
private function localizedPackageName(): string
|
|
{
|
|
$locale = $this->locale ?? app()->getLocale();
|
|
|
|
return $this->package->getNameForLocale($locale);
|
|
}
|
|
}
|