mirror of
https://github.com/Cybrarist/Discount-Bandit.git
synced 2026-11-24 19:49:54 +01:00
- sqlite support (default database). - add custom theme color option. - sidebar can be collapsed to use the full screen. - option to switch navigation to top bar instead of sidebar. - option to remove top bar completely. - option to add breadcrumbs - option to enable single page application mode (website feels like an app instead of loading page ) - add highest and lowest price (for the plugin mainly) - new settings for NTFY_CHANNEL_ID instead of passing whole link. - removed name field from create operation, with url autofocused, so you can paste the links faster. - custom settings are shared across the stores. - new filters in products. - removed dashboard page. - RSS feed added - notifications will have tags to know why you have been notified, along with highest and lowest price. Fixes: - Fetch works properly and live, please note it will fetch all the stores related, won't use queue anymore. (overusing it might block you) Removed: - groups. Technical Changes: - update money cast to round values. - remove update product details, since it's only used in one place. - remove is_store methods, easier to scale with new stores - created proper ntfy channel - all stores will go with key pivot value, instead of each store having its own column in database.
92 lines
3.8 KiB
PHP
92 lines
3.8 KiB
PHP
<?php
|
|
|
|
namespace App\Providers\Filament;
|
|
|
|
use App\Filament\Resources\StoreResource;
|
|
use Awcodes\FilamentQuickCreate\QuickCreatePlugin;
|
|
use Croustibat\FilamentJobsMonitor\FilamentJobsMonitorPlugin;
|
|
use Croustibat\FilamentJobsMonitor\Resources\QueueMonitorResource;
|
|
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\Support\Enums\MaxWidth;
|
|
use Filament\Widgets;
|
|
use FilipFonal\FilamentLogManager\FilamentLogManager;
|
|
use GeoSot\FilamentEnvEditor\FilamentEnvEditorPlugin;
|
|
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\Support\Facades\Auth;
|
|
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
|
use Jeffgreco13\FilamentBreezy\BreezyCore;
|
|
use Leandrocfe\FilamentApexCharts\FilamentApexChartsPlugin;
|
|
use pxlrbt\FilamentSpotlight\SpotlightPlugin;
|
|
use ShuvroRoy\FilamentSpatieLaravelHealth\FilamentSpatieLaravelHealthPlugin;
|
|
|
|
class AdminPanelProvider extends PanelProvider
|
|
{
|
|
public function panel(Panel $panel): Panel
|
|
{
|
|
return $panel
|
|
->default()
|
|
->id('admin')
|
|
->path('/')
|
|
->login()
|
|
->colors([
|
|
'primary' => Color::{config('settings.theme_color')},
|
|
])
|
|
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
|
|
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
|
|
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
|
|
->plugins([
|
|
FilamentApexChartsPlugin::make(),
|
|
FilamentSpatieLaravelHealthPlugin::make(),
|
|
SpotlightPlugin::make(),
|
|
FilamentLogManager::make(),
|
|
FilamentJobsMonitorPlugin::make(),
|
|
QuickCreatePlugin::make()
|
|
->excludes([
|
|
StoreResource::class,
|
|
QueueMonitorResource::class
|
|
]),
|
|
FilamentEnvEditorPlugin::make()
|
|
->navigationGroup('Settings'),
|
|
BreezyCore::make()
|
|
->myProfile()
|
|
->enableTwoFactorAuthentication()
|
|
->enableSanctumTokens(
|
|
permissions: ['get_product','create_product','delete_product'] // optional, customize the permissions (default = ["create", "view", "update", "delete"])
|
|
),
|
|
])
|
|
->middleware([
|
|
EncryptCookies::class,
|
|
AddQueuedCookiesToResponse::class,
|
|
StartSession::class,
|
|
AuthenticateSession::class,
|
|
ShareErrorsFromSession::class,
|
|
VerifyCsrfToken::class,
|
|
SubstituteBindings::class,
|
|
DisableBladeIconComponents::class,
|
|
DispatchServingFilamentEvent::class,
|
|
])
|
|
->authMiddleware([
|
|
Authenticate::class,
|
|
])
|
|
->brandLogo(logo: asset("storage/bandit.png"))
|
|
->brandName("Discount Bandit")
|
|
->maxContentWidth(MaxWidth::Full)
|
|
->sidebarCollapsibleOnDesktop()
|
|
->topNavigation(config('settings.top_nav'))
|
|
->topbar(config('settings.disable_top_bar'))
|
|
->breadcrumbs(config('settings.breadcrumbs'))
|
|
->spa(config('settings.spa'));
|
|
}
|
|
}
|