2026-04-03 03:50:40 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Providers\Filament;
|
|
|
|
|
|
|
|
|
|
use Filament\Http\Middleware\Authenticate;
|
|
|
|
|
use BezhanSalleh\FilamentShield\FilamentShieldPlugin;
|
|
|
|
|
use Filament\Http\Middleware\AuthenticateSession;
|
|
|
|
|
use Filament\Http\Middleware\DisableBladeIconComponents;
|
|
|
|
|
use Filament\Http\Middleware\DispatchServingFilamentEvent;
|
|
|
|
|
use Filament\Pages\Dashboard;
|
|
|
|
|
use Filament\Panel;
|
|
|
|
|
use Filament\PanelProvider;
|
|
|
|
|
use Filament\Support\Colors\Color;
|
2026-04-06 00:18:33 +07:00
|
|
|
use Filament\Support\Facades\FilamentView;
|
|
|
|
|
use Filament\View\PanelsRenderHook;
|
2026-04-03 03:50:40 +07:00
|
|
|
use Filament\Widgets\AccountWidget;
|
|
|
|
|
use Filament\Widgets\FilamentInfoWidget;
|
2026-04-06 00:18:33 +07:00
|
|
|
use Illuminate\Support\HtmlString;
|
2026-04-03 03:50:40 +07:00
|
|
|
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
|
|
|
|
use Illuminate\Cookie\Middleware\EncryptCookies;
|
|
|
|
|
use Illuminate\Foundation\Http\Middleware\PreventRequestForgery;
|
|
|
|
|
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
|
|
|
|
|
{
|
2026-04-06 00:18:33 +07:00
|
|
|
FilamentView::registerRenderHook(
|
2026-04-06 00:20:07 +07:00
|
|
|
PanelsRenderHook::FOOTER,
|
2026-04-06 00:18:33 +07:00
|
|
|
fn () => new HtmlString(
|
2026-04-06 00:20:07 +07:00
|
|
|
'<div class="flex justify-center py-3 border-t border-gray-100">
|
|
|
|
|
<a href="' . url('/panduan') . '" target="_blank"
|
|
|
|
|
class="flex items-center gap-1.5 text-xs text-gray-400 hover:text-gray-700 transition"
|
|
|
|
|
title="Panduan Penggunaan">
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
|
|
|
d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"/>
|
|
|
|
|
</svg>
|
|
|
|
|
Panduan Penggunaan
|
|
|
|
|
</a>
|
|
|
|
|
</div>'
|
2026-04-06 00:18:33 +07:00
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|
2026-04-03 03:50:40 +07:00
|
|
|
return $panel
|
|
|
|
|
->default()
|
2026-04-05 06:21:16 +07:00
|
|
|
->brandLogo(asset('images/logo.png'))
|
|
|
|
|
->brandLogoHeight('2rem')
|
2026-04-03 03:50:40 +07:00
|
|
|
->id('admin')
|
2026-04-03 04:34:21 +07:00
|
|
|
->path('dashboard')
|
2026-04-05 06:21:16 +07:00
|
|
|
->viteTheme('resources/css/filament/admin/theme.css')
|
2026-04-03 03:50:40 +07:00
|
|
|
->login()
|
2026-04-05 09:08:34 +07:00
|
|
|
->profile(\App\Filament\Pages\EditProfile::class)
|
2026-04-03 03:50:40 +07:00
|
|
|
->colors([
|
|
|
|
|
'primary' => Color::Amber,
|
|
|
|
|
])
|
2026-04-03 12:03:40 +07:00
|
|
|
->resourceCreatePageRedirect('index')
|
|
|
|
|
->resourceEditPageRedirect('index')
|
2026-04-03 07:57:40 +07:00
|
|
|
->databaseNotifications()
|
2026-04-03 03:50:40 +07:00
|
|
|
->discoverResources(in: app_path('Filament/Resources'), for: 'App\Filament\Resources')
|
|
|
|
|
->pages([
|
|
|
|
|
Dashboard::class,
|
|
|
|
|
])
|
2026-04-03 09:01:03 +07:00
|
|
|
->navigationGroups([
|
|
|
|
|
'Kegiatan',
|
|
|
|
|
'Keputusan',
|
|
|
|
|
'Keuangan',
|
|
|
|
|
'Audit',
|
|
|
|
|
'Konten',
|
|
|
|
|
'Organisasi',
|
|
|
|
|
])
|
2026-04-05 21:27:28 +07:00
|
|
|
|
2026-04-03 03:50:40 +07:00
|
|
|
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\Filament\Widgets')
|
|
|
|
|
->widgets([
|
|
|
|
|
AccountWidget::class,
|
2026-04-03 04:27:07 +07:00
|
|
|
\App\Filament\Widgets\StatsOverview::class,
|
2026-04-03 07:57:40 +07:00
|
|
|
\App\Filament\Widgets\ActivityLogWidget::class,
|
2026-04-05 06:21:16 +07:00
|
|
|
\App\Filament\Widgets\LeaderboardWidget::class,
|
2026-04-03 03:50:40 +07:00
|
|
|
])
|
|
|
|
|
->middleware([
|
|
|
|
|
EncryptCookies::class,
|
|
|
|
|
AddQueuedCookiesToResponse::class,
|
|
|
|
|
StartSession::class,
|
|
|
|
|
AuthenticateSession::class,
|
|
|
|
|
ShareErrorsFromSession::class,
|
|
|
|
|
PreventRequestForgery::class,
|
|
|
|
|
SubstituteBindings::class,
|
|
|
|
|
DisableBladeIconComponents::class,
|
|
|
|
|
DispatchServingFilamentEvent::class,
|
|
|
|
|
])
|
|
|
|
|
->plugins([
|
|
|
|
|
FilamentShieldPlugin::make(),
|
|
|
|
|
])
|
|
|
|
|
->authMiddleware([
|
|
|
|
|
Authenticate::class,
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
}
|