update
This commit is contained in:
parent
a8f1fdb09a
commit
487f801a17
4 changed files with 32 additions and 3 deletions
|
@ -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'),
|
||||
|
|
22
web/app/Filament/Widgets/CustomersCount.php
Normal file
22
web/app/Filament/Widgets/CustomersCount.php
Normal 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'),
|
||||
];
|
||||
}
|
||||
}
|
|
@ -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,
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
.fi-sidebar {
|
||||
width: 230px;
|
||||
background-color: rgba(255, 255, 255, 0.07) !important;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue