2023-11-23 21:38:30 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers\Filament;
|
|
|
|
|
2024-04-02 12:41:07 +00:00
|
|
|
use App\Filament\Pages\Settings\Settings;
|
2024-04-02 22:40:38 +00:00
|
|
|
use App\Filament\Widgets\CustomersCount;
|
2024-04-04 19:03:50 +00:00
|
|
|
use App\Filament\Widgets\ServerDiskUsageStatistic;
|
|
|
|
use App\Filament\Widgets\ServerMemoryStatistic;
|
|
|
|
use App\Filament\Widgets\ServerMemoryStatisticCount;
|
2024-04-02 23:05:46 +00:00
|
|
|
use App\Filament\Widgets\Websites;
|
2023-11-23 21:38:30 +00:00
|
|
|
use Filament\Http\Middleware\Authenticate;
|
|
|
|
use Filament\Http\Middleware\DisableBladeIconComponents;
|
|
|
|
use Filament\Http\Middleware\DispatchServingFilamentEvent;
|
2024-04-02 17:19:39 +00:00
|
|
|
use Filament\Navigation\NavigationGroup;
|
2023-11-23 21:38:30 +00:00
|
|
|
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;
|
2024-04-04 17:45:04 +00:00
|
|
|
use Leandrocfe\FilamentApexCharts\FilamentApexChartsPlugin;
|
2024-04-02 12:41:07 +00:00
|
|
|
use Outerweb\FilamentSettings\Filament\Plugins\FilamentSettingsPlugin;
|
2024-04-02 17:43:56 +00:00
|
|
|
use Tapp\FilamentAuthenticationLog\FilamentAuthenticationLogPlugin;
|
2023-11-23 21:38:30 +00:00
|
|
|
|
|
|
|
class AdminPanelProvider extends PanelProvider
|
|
|
|
{
|
|
|
|
public function panel(Panel $panel): Panel
|
|
|
|
{
|
|
|
|
return $panel
|
|
|
|
->default()
|
2023-11-23 22:11:26 +00:00
|
|
|
->darkMode(true)
|
2023-11-23 21:38:30 +00:00
|
|
|
->id('admin')
|
|
|
|
->path('admin')
|
|
|
|
->login()
|
2024-04-02 23:05:46 +00:00
|
|
|
->sidebarWidth('14.5rem')
|
2024-04-02 22:06:59 +00:00
|
|
|
// ->brandLogo(fn () => view('filament.admin.logo'))
|
|
|
|
->brandLogo(asset('images/phyre-logo.svg'))
|
2024-04-04 17:00:08 +00:00
|
|
|
->brandLogoHeight('2.4rem')
|
2023-11-23 21:38:30 +00:00
|
|
|
->colors([
|
2024-04-06 13:01:46 +00:00
|
|
|
Color::Yellow,
|
2023-11-23 21:38:30 +00:00
|
|
|
])
|
2024-04-02 22:25:57 +00:00
|
|
|
// ->colors([
|
|
|
|
// 'primary' => [
|
|
|
|
// 50 => '249, 206, 38',
|
|
|
|
// 100 => '249, 206, 38',
|
|
|
|
// 200 => '249, 206, 38',
|
|
|
|
// 300 => '249, 206, 38',
|
|
|
|
// 400 => '249, 206, 38',
|
|
|
|
// 500 => '249, 206, 38',
|
|
|
|
// 600 => '249, 206, 38',
|
|
|
|
// 700 => '249, 206, 38',
|
|
|
|
// 800 => '249, 206, 38',
|
|
|
|
// 900 => '249, 206, 38',
|
|
|
|
// 950 => '249, 206, 38',
|
|
|
|
// ],
|
|
|
|
// ])
|
2024-04-02 17:19:39 +00:00
|
|
|
->navigationGroups([
|
2024-04-02 18:54:23 +00:00
|
|
|
'Hosting Services' => NavigationGroup::make()->label('Hosting Services'),
|
|
|
|
'Server Management' => NavigationGroup::make()->label('Server Management'),
|
2024-04-02 17:19:39 +00:00
|
|
|
])
|
2023-11-23 21:38:30 +00:00
|
|
|
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
|
|
|
|
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
|
2024-04-02 21:52:03 +00:00
|
|
|
|
2024-04-06 13:01:46 +00:00
|
|
|
->discoverClusters(in: module_path('Microweber', 'Filament/Clusters'), for: 'Modules\\Microweber\\Filament\\Clusters')
|
2024-04-02 21:52:03 +00:00
|
|
|
|
2023-11-23 21:38:30 +00:00
|
|
|
->pages([
|
|
|
|
Pages\Dashboard::class,
|
|
|
|
])
|
2024-04-02 12:41:07 +00:00
|
|
|
->plugins([
|
2024-04-06 13:01:46 +00:00
|
|
|
// FilamentAuthenticationLogPlugin::make(),
|
2024-04-04 17:45:04 +00:00
|
|
|
FilamentApexChartsPlugin::make(),
|
|
|
|
FilamentSettingsPlugin::make()->pages([
|
2024-04-02 12:41:07 +00:00
|
|
|
Settings::class,
|
2024-04-06 13:01:46 +00:00
|
|
|
]),
|
2024-04-02 12:41:07 +00:00
|
|
|
])
|
2024-04-04 19:03:50 +00:00
|
|
|
// ->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
|
2023-11-23 21:38:30 +00:00
|
|
|
->widgets([
|
2024-04-04 19:03:50 +00:00
|
|
|
ServerDiskUsageStatistic::class,
|
2024-04-04 19:37:14 +00:00
|
|
|
ServerMemoryStatistic::class,
|
2024-04-06 13:01:46 +00:00
|
|
|
// ServerMemoryStatisticCount::class,
|
2024-04-02 22:40:38 +00:00
|
|
|
CustomersCount::class,
|
2024-04-02 23:05:46 +00:00
|
|
|
Websites::class,
|
2024-04-06 13:01:46 +00:00
|
|
|
// Widgets\AccountWidget::class,
|
|
|
|
// Widgets\FilamentInfoWidget::class,
|
2023-11-23 21:38:30 +00:00
|
|
|
])
|
|
|
|
->middleware([
|
|
|
|
EncryptCookies::class,
|
|
|
|
AddQueuedCookiesToResponse::class,
|
|
|
|
StartSession::class,
|
|
|
|
AuthenticateSession::class,
|
|
|
|
ShareErrorsFromSession::class,
|
|
|
|
VerifyCsrfToken::class,
|
|
|
|
SubstituteBindings::class,
|
|
|
|
DisableBladeIconComponents::class,
|
|
|
|
DispatchServingFilamentEvent::class,
|
|
|
|
])
|
|
|
|
->authMiddleware([
|
|
|
|
Authenticate::class,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|