diff --git a/app/Filament/User/Pages/AboutUs.php b/app/Filament/User/Pages/AboutUs.php index d816855..febe3c3 100644 --- a/app/Filament/User/Pages/AboutUs.php +++ b/app/Filament/User/Pages/AboutUs.php @@ -6,7 +6,7 @@ use Filament\Pages\Page; class AboutUs extends Page { - protected static ?string $navigationIcon = 'heroicon-o-document-text'; + protected static ?string $navigationIcon = 'heroicon-o-information-circle'; protected static string $view = 'filament.user.pages.about-us'; } diff --git a/app/Filament/User/Pages/Deposits.php b/app/Filament/User/Pages/Deposits.php index 920a92e..61f8fa5 100644 --- a/app/Filament/User/Pages/Deposits.php +++ b/app/Filament/User/Pages/Deposits.php @@ -6,7 +6,7 @@ use Filament\Pages\Page; class Deposits extends Page { - protected static ?string $navigationIcon = 'iconsax-two-money-recive'; + protected static ?string $navigationIcon = 'heroicon-o-currency-dollar'; protected static string $view = 'filament.user.pages.deposits'; } diff --git a/app/Filament/User/Pages/Lobby.php b/app/Filament/User/Pages/Lobby.php index ae257c4..fae1221 100644 --- a/app/Filament/User/Pages/Lobby.php +++ b/app/Filament/User/Pages/Lobby.php @@ -6,7 +6,7 @@ use Filament\Pages\Page; class Lobby extends Page { - protected static ?string $navigationIcon = 'ri-home-smile-2-fill'; + protected static ?string $navigationIcon = 'heroicon-o-document-text'; protected static string $view = 'filament.user.pages.lobby'; } diff --git a/app/Filament/User/Pages/Profile.php b/app/Filament/User/Pages/Profile.php index 865fe18..65a4abe 100644 --- a/app/Filament/User/Pages/Profile.php +++ b/app/Filament/User/Pages/Profile.php @@ -6,7 +6,7 @@ use Filament\Pages\Page; class Profile extends Page { - protected static ?string $navigationIcon = 'carbon-user-profile'; + protected static ?string $navigationIcon = 'heroicon-o-user-circle'; protected static string $view = 'filament.user.pages.profile'; } diff --git a/app/Filament/User/Pages/Transactions.php b/app/Filament/User/Pages/Transactions.php index 8172024..3fdd23d 100644 --- a/app/Filament/User/Pages/Transactions.php +++ b/app/Filament/User/Pages/Transactions.php @@ -6,7 +6,7 @@ use Filament\Pages\Page; class Transactions extends Page { - protected static ?string $navigationIcon = 'polaris-transaction-icon'; + protected static ?string $navigationIcon = 'heroicon-o-document-text'; protected static string $view = 'filament.user.pages.transactions'; } diff --git a/app/Filament/User/Pages/VIP.php b/app/Filament/User/Pages/VIP.php index 13ee261..fbe80e2 100644 --- a/app/Filament/User/Pages/VIP.php +++ b/app/Filament/User/Pages/VIP.php @@ -6,7 +6,7 @@ use Filament\Pages\Page; class VIP extends Page { - protected static ?string $navigationIcon = 'ri-vip-crown-2-fill'; + protected static ?string $navigationIcon = 'heroicon-o-star'; protected static string $view = 'filament.user.pages.v-i-p'; } diff --git a/app/Providers/AdminPanelProvider.php b/app/Providers/AdminPanelProvider.php new file mode 100644 index 0000000..692253f --- /dev/null +++ b/app/Providers/AdminPanelProvider.php @@ -0,0 +1,58 @@ +default() + ->id('admin') + ->path('admin') + ->login() + ->colors([ + 'primary' => Color::Green, // Neon green for admin + ]) + ->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources') + ->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages') + ->pages([ + Pages\Dashboard::class, + ]) + ->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets') + ->widgets([ + Widgets\AccountWidget::class, + Widgets\FilamentInfoWidget::class, + ]) + ->middleware([ + EncryptCookies::class, + AddQueuedCookiesToResponse::class, + StartSession::class, + AuthenticateSession::class, + ShareErrorsFromSession::class, + VerifyCsrfToken::class, + SubstituteBindings::class, + DisableBladeIconComponents::class, + DispatchServingFilamentEvent::class, + ]) + ->authMiddleware([ + Authenticate::class, + ]); + } +} \ No newline at end of file diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 3dc7c5b..781b1b9 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -1,63 +1,30 @@ default() - ->id('admin') - ->path('admin') - ->login() - ->colors([ - 'primary' => Color::Green, // Neon green accents for crypto feel - ]) - ->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources') - ->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages') - ->pages([ - Pages\Dashboard::class, - ]) - ->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets') - ->widgets([ - Widgets\AccountWidget::class, - Widgets\FilamentInfoWidget::class, - ]) - ->middleware([ - EncryptCookies::class, - AddQueuedCookiesToResponse::class, - StartSession::class, - AuthenticateSession::class, - ShareErrorsFromSession::class, - VerifyCsrfToken::class, - SubstituteBindings::class, - DisableBladeIconComponents::class, - DispatchServingFilamentEvent::class, - ]) - ->authMiddleware([ - Authenticate::class, - ]); + // } - public function boot(): void + + public function boot() { + // Register Spatie permissions app(PermissionRegistrar::class)->setPermissionClass(\Spatie\Permission\Models\Permission::class); + + // Redirect authenticated users to Filament lobby only for specific routes + $this->app['router']->middleware('web')->group(function () { + $currentRoute = request()->route() ? request()->route()->getName() : ''; + if (Auth::check() && in_array($currentRoute, ['home', 'login', 'register'])) { + Redirect::to(route('filament.user.pages.lobby'))->send(); + } + }); } -} +} \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 1e14b22..4ead47e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -5,9 +5,6 @@ use App\Http\Controllers\Auth\AuthenticatedSessionController; // Landing page for non-logged-in users with placeholder stats Route::get('/', function () { - if (auth()->check()) { - return redirect()->route('filament.user.pages.lobby'); - } $gamesCount = 10; // Placeholder $usersCount = 100; // Placeholder $biggestJackpot = 5000; // Placeholder