This commit is contained in:
Bozhidar Slaveykov 2024-04-03 01:40:38 +03:00
parent a8f1fdb09a
commit 487f801a17
4 changed files with 32 additions and 3 deletions

View file

@ -32,7 +32,7 @@ class Modules extends Page
],
'Content Management'=>[
[
'name' => 'Microweber CMS',
'name' => 'Microweber',
'description' => 'A drag and drop website builder and a powerful next-generation CMS.',
'url' => url('admin/microweber'),
'iconUrl' => url('images/modules/microweber.png'),

View file

@ -0,0 +1,22 @@
<?php
namespace App\Filament\Widgets;
use App\Models\Customer;
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Stat;
class CustomersCount extends BaseWidget
{
protected static bool $isLazy = false;
protected function getStats(): array
{
$customersCount = Customer::count();
return [
Stat::make('Customers', $customersCount)->icon('heroicon-o-users'),
Stat::make('Active Customers', $customersCount)->icon('heroicon-o-user-group'),
Stat::make('Inactive Customers', 0)->icon('heroicon-o-user-minus'),
];
}
}

View file

@ -3,6 +3,7 @@
namespace App\Providers\Filament;
use App\Filament\Pages\Settings\Settings;
use App\Filament\Widgets\CustomersCount;
use Filament\Http\Middleware\Authenticate;
use Filament\Http\Middleware\DisableBladeIconComponents;
use Filament\Http\Middleware\DispatchServingFilamentEvent;
@ -74,8 +75,9 @@ class AdminPanelProvider extends PanelProvider
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
CustomersCount::class,
// Widgets\AccountWidget::class,
// Widgets\FilamentInfoWidget::class,
])
->middleware([
EncryptCookies::class,

View file

@ -1,3 +1,8 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
.fi-sidebar {
width: 230px;
background-color: rgba(255, 255, 255, 0.07) !important;
}