Files
ladill-woo-manager/app/Support/Invoice/InvoiceTemplateCatalog.php
T
isaaccladandCursor ffe0b9d877
Deploy Ladill Woo Manager / deploy (push) Failing after 2s
Scaffold Ladill Woo Manager for WooCommerce order fulfillment.
Standalone app with SSO shell, WordPress plugin connect flow, webhook ingest,
fulfillment inbox, and plugin activation API — no payment processing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 22:39:38 +00:00

44 lines
1.1 KiB
PHP

<?php
namespace App\Support\Invoice;
class InvoiceTemplateCatalog
{
/** @return array<string, string> */
public static function labels(): array
{
return [
'classic' => 'Classic',
'modern' => 'Modern',
'minimal' => 'Minimal',
'bold' => 'Bold',
'professional' => 'Professional',
];
}
public static function isValid(string $template): bool
{
return array_key_exists($template, self::labels());
}
public static function default(): string
{
return 'classic';
}
public static function view(string $template): string
{
$template = self::isValid($template) ? $template : self::default();
return 'invoices.templates.'.$template;
}
/** Preview thumbnail URL for a template (public/images/invoice-templates/<key>.svg). */
public static function thumbnail(string $template): string
{
$template = self::isValid($template) ? $template : self::default();
return asset('images/invoice-templates/'.$template.'.svg');
}
}