initial: bootstrap from BukidBountyApp base
This commit is contained in:
24
app/Http/Controllers/Support/Inertia.php
Normal file
24
app/Http/Controllers/Support/Inertia.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Controllers\Support;
|
||||
|
||||
use App\Support\AppVersion;
|
||||
use App\Http\Controllers\Admin\SystemSettingsController;
|
||||
|
||||
class Inertia
|
||||
{
|
||||
public static function render(string $component, array $props = [])
|
||||
{
|
||||
// Add public system settings to every page load to avoid branding flutters
|
||||
$props['systemSettings'] = SystemSettingsController::getPublicSettingsData();
|
||||
|
||||
return [
|
||||
'component' => $component,
|
||||
'props' => $props,
|
||||
'url' => $_SERVER['REQUEST_URI'] ?? '/',
|
||||
'version' => AppVersion::get(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user