Cleanup Added lobby menu and page items. fix for root redirect
This commit is contained in:
12
app/Filament/User/Pages/AboutUs.php
Normal file
12
app/Filament/User/Pages/AboutUs.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\User\Pages;
|
||||
|
||||
use Filament\Pages\Page;
|
||||
|
||||
class AboutUs extends Page
|
||||
{
|
||||
protected static ?string $navigationIcon = 'heroicon-o-document-text';
|
||||
|
||||
protected static string $view = 'filament.user.pages.about-us';
|
||||
}
|
||||
12
app/Filament/User/Pages/Deposits.php
Normal file
12
app/Filament/User/Pages/Deposits.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\User\Pages;
|
||||
|
||||
use Filament\Pages\Page;
|
||||
|
||||
class Deposits extends Page
|
||||
{
|
||||
protected static ?string $navigationIcon = 'iconsax-two-money-recive';
|
||||
|
||||
protected static string $view = 'filament.user.pages.deposits';
|
||||
}
|
||||
@@ -6,7 +6,7 @@ use Filament\Pages\Page;
|
||||
|
||||
class Lobby extends Page
|
||||
{
|
||||
protected static ?string $navigationIcon = 'heroicon-o-home';
|
||||
protected static ?string $navigationIcon = 'ri-home-smile-2-fill';
|
||||
|
||||
protected static string $view = 'filament.user.pages.lobby';
|
||||
}
|
||||
}
|
||||
|
||||
12
app/Filament/User/Pages/Profile.php
Normal file
12
app/Filament/User/Pages/Profile.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\User\Pages;
|
||||
|
||||
use Filament\Pages\Page;
|
||||
|
||||
class Profile extends Page
|
||||
{
|
||||
protected static ?string $navigationIcon = 'carbon-user-profile';
|
||||
|
||||
protected static string $view = 'filament.user.pages.profile';
|
||||
}
|
||||
12
app/Filament/User/Pages/Transactions.php
Normal file
12
app/Filament/User/Pages/Transactions.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\User\Pages;
|
||||
|
||||
use Filament\Pages\Page;
|
||||
|
||||
class Transactions extends Page
|
||||
{
|
||||
protected static ?string $navigationIcon = 'polaris-transaction-icon';
|
||||
|
||||
protected static string $view = 'filament.user.pages.transactions';
|
||||
}
|
||||
12
app/Filament/User/Pages/VIP.php
Normal file
12
app/Filament/User/Pages/VIP.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\User\Pages;
|
||||
|
||||
use Filament\Pages\Page;
|
||||
|
||||
class VIP extends Page
|
||||
{
|
||||
protected static ?string $navigationIcon = 'ri-vip-crown-2-fill';
|
||||
|
||||
protected static string $view = 'filament.user.pages.v-i-p';
|
||||
}
|
||||
17
app/Filament/User/Widgets/AdminButtonWidget.php
Normal file
17
app/Filament/User/Widgets/AdminButtonWidget.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\User\Widgets;
|
||||
|
||||
use Filament\Widgets\Widget;
|
||||
|
||||
class AdminButtonWidget extends Widget
|
||||
{
|
||||
protected static ?int $sort = 1;
|
||||
|
||||
protected static string $view = 'filament.user.widgets.admin-button-widget';
|
||||
|
||||
public function shouldRender(): bool
|
||||
{
|
||||
return auth()->user()->role === 'admin';
|
||||
}
|
||||
}
|
||||
17
app/Filament/User/Widgets/AdminLinkWidget.php
Normal file
17
app/Filament/User/Widgets/AdminLinkWidget.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\User\Widgets;
|
||||
|
||||
use Filament\Widgets\Widget;
|
||||
|
||||
class AdminLinkWidget extends Widget
|
||||
{
|
||||
protected static ?int $sort = 2;
|
||||
|
||||
protected static string $view = 'filament.user.widgets.admin-link-widget';
|
||||
|
||||
public function shouldRender(): bool
|
||||
{
|
||||
return auth()->user() && auth()->user()->role === 'admin';
|
||||
}
|
||||
}
|
||||
@@ -24,19 +24,21 @@ class UserPanelProvider extends PanelProvider
|
||||
{
|
||||
return $panel
|
||||
->id('user')
|
||||
->path('user')
|
||||
->path('') // Serve at root (/)
|
||||
->login()
|
||||
->colors([
|
||||
'primary' => Color::Green, // Neon green accents
|
||||
'primary' => Color::Purple, // Purple for user panel
|
||||
])
|
||||
->brandLogo(null) // Text brand name only
|
||||
->discoverResources(in: app_path('Filament/User/Resources'), for: 'App\\Filament\\User\\Resources')
|
||||
->discoverPages(in: app_path('Filament/User/Pages'), for: 'App\\Filament\\User\\Pages')
|
||||
->pages([
|
||||
Pages\Dashboard::class, # Lobby as dashboard
|
||||
Pages\Dashboard::class, // Lobby as dashboard
|
||||
])
|
||||
->discoverWidgets(in: app_path('Filament/User/Widgets'), for: 'App\\Filament\\User\\Widgets')
|
||||
->widgets([
|
||||
Widgets\AccountWidget::class,
|
||||
\App\Filament\User\Widgets\AdminLinkWidget::class, // Correct namespace
|
||||
])
|
||||
->middleware([
|
||||
EncryptCookies::class,
|
||||
@@ -53,7 +55,8 @@ class UserPanelProvider extends PanelProvider
|
||||
Authenticate::class,
|
||||
])
|
||||
->navigationGroups([
|
||||
'Casino' # Group for games, deposits, transactions
|
||||
]);
|
||||
'Casino' // Group for games, deposits, transactions
|
||||
])
|
||||
->default();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user