ifnex/04_Laravel/app/Providers/Filament/AdminPanelProvider.php
Kazem Alghasi 11b524cf43 refactor: improve hero section responsiveness and update admin path
WordPress:
- Refactor hero section layout using CSS Grid for better responsiveness across desktop, tablet, and mobile devices.
- Improve spacing and alignment for hero buttons and trust badges.
- Fix admin bar offset issues in the hero section.
- Clean up redundant HTML tags in front-page template.

Laravel:
- Change Filament admin panel path from 'admin' to 'panel'.
- Clean up comments in web routes.
2026-08-12 11:58:46 +03:30

88 lines
3.2 KiB
PHP

<?php
namespace App\Providers\Filament;
use Filament\Http\Middleware\Authenticate;
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\AuthenticateSession;
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('panel')
->login()
->brandName('IFNEX Logistics')
->colors([
'primary' => Color::Amber,
'gray' => [
50 => '#f8fafc',
100 => '#f1f5f9',
200 => '#e2e8f0',
300 => '#cbd5e1',
400 => '#94a3b8',
500 => '#64748b',
600 => '#475569',
700 => '#334155',
800 => '#1e293b',
900 => '#1a1a2e',
950 => '#0f172a',
],
'danger' => Color::Red,
'info' => Color::Blue,
'success' => Color::Emerald,
'warning' => Color::Amber,
])
->font('Vazirmatn')
->spa()
->sidebarCollapsibleOnDesktop()
->darkMode(true)
->databaseNotifications()
->globalSearchKeyBindings(['command+k', 'ctrl+k'])
->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([
// ویجت‌های سفارشی IFNEX (به ترتیب sort)
\App\Filament\Widgets\DashboardInfoWidget::class,
\App\Filament\Widgets\ExchangeRateWidget::class,
\App\Filament\Widgets\WalletStats::class,
])
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
])
->authMiddleware([
Authenticate::class,
])
->renderHook(
'panels::head.start',
fn () => view('filament.hooks.head')
);
}
}