- Implemented the full Fat Bottom Grille storefront and staff dashboard.
Highlights include configurable menus, specials, cart/checkout, taxes, customer accounts with email 2FA, newsletters, analytics, refunds, PDF/CSV exports, Square/Mailgun adapters, and optional MySQL migration. See README.md for setup and production configuration. Verified PHP/JavaScript syntax, responsive layouts, registration, 2FA, checkout, dashboard workflows, settings persistence, and PDF generation. Real Square, Mailgun, and MySQL connections require credentials/server access. Square implementation follows the official Payments API and Refunds API.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FatBottom\Core;
|
||||
|
||||
final class View
|
||||
{
|
||||
public static function render(string $template, array $data = []): void
|
||||
{
|
||||
$templatePath = BASE_PATH . '/views/' . $template . '.php';
|
||||
if (!is_file($templatePath)) {
|
||||
Http::abort(500, 'View not found.');
|
||||
}
|
||||
|
||||
extract($data, EXTR_SKIP);
|
||||
require BASE_PATH . '/views/layout.php';
|
||||
}
|
||||
|
||||
public static function partial(string $template, array $data = []): void
|
||||
{
|
||||
extract($data, EXTR_SKIP);
|
||||
require BASE_PATH . '/views/' . $template . '.php';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user