Initial commit

This commit is contained in:
root
2026-05-09 17:28:23 +02:00
commit 9d73f82529
5575 changed files with 281989 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
<?php
namespace App\Providers;
use App\Models\Miscellaneous\WebsiteSetting;
use Illuminate\Support\ServiceProvider;
class PwaServiceProvider extends ServiceProvider
{
public function register(): void
{
//
}
public function boot(): void
{
// PWA manifest and service worker are served from public/
// This provider can be extended for push notifications
}
public static function isEnabled(): bool
{
$setting = WebsiteSetting::where('key', 'pwa_enabled')->first();
return $setting?->value === '1';
}
public static function getConfig(): array
{
$enabled = self::isEnabled();
return [
'enabled' => $enabled,
'name' => setting('pwa_name', 'Epicnabbo Hotel'),
'short_name' => setting('pwa_short_name', 'Epicnabbo'),
'description' => setting('pwa_description', 'Welcome to Epicnabbo - Your Habbo Hotel'),
'theme_color' => setting('pwa_theme_color', '#eeb425'),
'background_color' => setting('pwa_background_color', '#1a1a2e'),
];
}
}