|
1
|
|
|
<?php |
|
2
|
|
|
namespace Usamamuneerchaudhary\Notifier; |
|
3
|
|
|
|
|
4
|
|
|
use Filament\Contracts\Plugin; |
|
5
|
|
|
use Filament\Panel; |
|
6
|
|
|
use Usamamuneerchaudhary\Notifier\Filament\Resources\NotificationChannelResource; |
|
7
|
|
|
use Usamamuneerchaudhary\Notifier\Filament\Pages\EventChannelConfiguration; |
|
8
|
|
|
use Usamamuneerchaudhary\Notifier\Filament\Pages\NotifierDashboard; |
|
9
|
|
|
use Usamamuneerchaudhary\Notifier\Filament\Pages\NotificationSettings; |
|
10
|
|
|
use Usamamuneerchaudhary\Notifier\Filament\Resources\NotificationEventResource; |
|
11
|
|
|
use Usamamuneerchaudhary\Notifier\Filament\Resources\NotificationTemplateResource; |
|
12
|
|
|
use Usamamuneerchaudhary\Notifier\Filament\Resources\NotificationResource; |
|
13
|
|
|
use Usamamuneerchaudhary\Notifier\Filament\Widgets\NotificationAnalyticsChart; |
|
14
|
|
|
use Usamamuneerchaudhary\Notifier\Filament\Widgets\NotificationChannelPerformance; |
|
15
|
|
|
use Usamamuneerchaudhary\Notifier\Filament\Widgets\NotificationEngagementStats; |
|
16
|
|
|
use Usamamuneerchaudhary\Notifier\Filament\Widgets\NotificationStatsOverview; |
|
17
|
|
|
use Usamamuneerchaudhary\Notifier\Filament\Widgets\NotificationTimeSeriesChart; |
|
18
|
|
|
use Usamamuneerchaudhary\Notifier\Filament\Widgets\RateLimitingStatusWidget; |
|
19
|
|
|
|
|
20
|
|
|
class FilamentNotifierPlugin implements Plugin |
|
21
|
|
|
{ |
|
22
|
|
|
public function getId(): string |
|
23
|
|
|
{ |
|
24
|
|
|
return 'notifier'; |
|
25
|
|
|
} |
|
26
|
|
|
|
|
27
|
|
|
public function register(Panel $panel): void |
|
28
|
|
|
{ |
|
29
|
|
|
$panel |
|
30
|
|
|
->widgets([ |
|
31
|
|
|
NotificationStatsOverview::class, |
|
32
|
|
|
NotificationEngagementStats::class, |
|
33
|
|
|
NotificationTimeSeriesChart::class, |
|
34
|
|
|
NotificationAnalyticsChart::class, |
|
35
|
|
|
NotificationChannelPerformance::class, |
|
36
|
|
|
RateLimitingStatusWidget::class, |
|
37
|
|
|
]) |
|
38
|
|
|
->resources([ |
|
39
|
|
|
NotificationChannelResource::class, |
|
40
|
|
|
NotificationEventResource::class, |
|
41
|
|
|
NotificationTemplateResource::class, |
|
42
|
|
|
NotificationResource::class, |
|
43
|
|
|
]) |
|
44
|
|
|
->pages([ |
|
45
|
|
|
NotifierDashboard::class, |
|
46
|
|
|
NotificationSettings::class, |
|
47
|
|
|
EventChannelConfiguration::class, |
|
48
|
|
|
]); |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
public function boot(Panel $panel): void |
|
52
|
|
|
{ |
|
53
|
|
|
// |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
public static function make(): static |
|
57
|
|
|
{ |
|
58
|
|
|
return new static(); |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
} |
|
62
|
|
|
|