The working state of the app. Still one issue with login
This commit is contained in:
@@ -6,7 +6,7 @@ use Filament\Pages\Page;
|
|||||||
|
|
||||||
class AboutUs extends 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';
|
protected static string $view = 'filament.user.pages.about-us';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use Filament\Pages\Page;
|
|||||||
|
|
||||||
class Deposits extends 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';
|
protected static string $view = 'filament.user.pages.deposits';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use Filament\Pages\Page;
|
|||||||
|
|
||||||
class Lobby extends 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';
|
protected static string $view = 'filament.user.pages.lobby';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use Filament\Pages\Page;
|
|||||||
|
|
||||||
class Profile extends 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';
|
protected static string $view = 'filament.user.pages.profile';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use Filament\Pages\Page;
|
|||||||
|
|
||||||
class Transactions extends 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';
|
protected static string $view = 'filament.user.pages.transactions';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use Filament\Pages\Page;
|
|||||||
|
|
||||||
class VIP extends 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';
|
protected static string $view = 'filament.user.pages.v-i-p';
|
||||||
}
|
}
|
||||||
|
|||||||
58
app/Providers/AdminPanelProvider.php
Normal file
58
app/Providers/AdminPanelProvider.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers\Filament;
|
||||||
|
|
||||||
|
use Filament\Http\Middleware\Authenticate;
|
||||||
|
use Filament\Http\Middleware\AuthenticateSession;
|
||||||
|
use Filament\Http\Middleware\DisableBladeIconComponents;
|
||||||
|
use Filament\Http\Middleware\DispatchServingFilamentEvent;
|
||||||
|
use Filament\Pages;
|
||||||
|
use Filament\Panel;
|
||||||
|
use Filament\PanelProvider;
|
||||||
|
use Filament\Support\Colors\Color;
|
||||||
|
use Filament\Widgets;
|
||||||
|
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
||||||
|
use Illuminate\Cookie\Middleware\EncryptCookies;
|
||||||
|
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
|
||||||
|
use Illuminate\Routing\Middleware\SubstituteBindings;
|
||||||
|
use Illuminate\Session\Middleware\StartSession;
|
||||||
|
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||||
|
|
||||||
|
class AdminPanelProvider extends PanelProvider
|
||||||
|
{
|
||||||
|
public function panel(Panel $panel): Panel
|
||||||
|
{
|
||||||
|
return $panel
|
||||||
|
->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,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,63 +1,30 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Providers\Filament;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Filament\Http\Middleware\Authenticate;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Filament\Http\Middleware\AuthenticateSession;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Filament\Http\Middleware\DisableBladeIconComponents;
|
use Illuminate\Support\Facades\Redirect;
|
||||||
use Filament\Http\Middleware\DispatchServingFilamentEvent;
|
|
||||||
use Filament\Pages;
|
|
||||||
use Filament\Panel;
|
|
||||||
use Filament\PanelProvider;
|
|
||||||
use Filament\Support\Colors\Color;
|
|
||||||
use Filament\Widgets;
|
|
||||||
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
|
||||||
use Illuminate\Cookie\Middleware\EncryptCookies;
|
|
||||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
|
|
||||||
use Illuminate\Routing\Middleware\SubstituteBindings;
|
|
||||||
use Illuminate\Session\Middleware\StartSession;
|
|
||||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
|
||||||
use Spatie\Permission\PermissionRegistrar;
|
use Spatie\Permission\PermissionRegistrar;
|
||||||
|
|
||||||
class AdminPanelProvider extends PanelProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
public function panel(Panel $panel): Panel
|
public function register()
|
||||||
{
|
{
|
||||||
return $panel
|
//
|
||||||
->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);
|
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();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,9 +5,6 @@ use App\Http\Controllers\Auth\AuthenticatedSessionController;
|
|||||||
|
|
||||||
// Landing page for non-logged-in users with placeholder stats
|
// Landing page for non-logged-in users with placeholder stats
|
||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
if (auth()->check()) {
|
|
||||||
return redirect()->route('filament.user.pages.lobby');
|
|
||||||
}
|
|
||||||
$gamesCount = 10; // Placeholder
|
$gamesCount = 10; // Placeholder
|
||||||
$usersCount = 100; // Placeholder
|
$usersCount = 100; // Placeholder
|
||||||
$biggestJackpot = 5000; // Placeholder
|
$biggestJackpot = 5000; // Placeholder
|
||||||
|
|||||||
Reference in New Issue
Block a user