forked from alexjustesen/speedtest-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEventServiceProvider.php
More file actions
91 lines (77 loc) · 3.32 KB
/
EventServiceProvider.php
File metadata and controls
91 lines (77 loc) · 3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
namespace App\Providers;
use App\Events\SpeedtestCompleted;
use App\Events\SpeedtestFailed;
use App\Events\SpeedtestStarted;
use App\Listeners\ClearApplicationCache;
use App\Listeners\Data\InfluxDb2Listener;
use App\Listeners\Database\SendSpeedtestCompletedNotification as DatabaseSendSpeedtestCompletedNotification;
use App\Listeners\Database\SendSpeedtestThresholdNotification as DatabaseSendSpeedtestThresholdNotification;
use App\Listeners\Discord\SendSpeedtestCompletedNotification as DiscordSendSpeedtestCompletedNotification;
use App\Listeners\Discord\SendSpeedtestThresholdNotification as DiscordSendSpeedtestThresholdNotification;
use App\Listeners\Mail\SendSpeedtestCompletedNotification as MailSendSpeedtestCompletedNotification;
use App\Listeners\Mail\SendSpeedtestThresholdNotification as MailSendSpeedtestThresholdNotification;
use App\Listeners\Telegram\SendSpeedtestCompletedNotification as TelegramSendSpeedtestCompletedNotification;
use App\Listeners\Telegram\SendSpeedtestThresholdNotification as TelegramSendSpeedtestThresholdNotification;
use App\Listeners\Webhook\SendSpeedtestCompletedNotification as WebhookSendSpeedtestCompletedNotification;
use App\Listeners\Webhook\SendSpeedtestThresholdNotification as WebhookSendSpeedtestThresholdNotification;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;
use Spatie\LaravelSettings\Events\SettingsSaved;
class EventServiceProvider extends ServiceProvider
{
/**
* The event to listener mappings for the application.
*
* @var array<class-string, array<int, class-string>>
*/
protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
SettingsSaved::class => [
ClearApplicationCache::class,
],
SpeedtestCompleted::class => [
// Data listeners
InfluxDb2Listener::class,
// Database notification listeners
DatabaseSendSpeedtestCompletedNotification::class,
DatabaseSendSpeedtestThresholdNotification::class,
// Discord notification listeners
DiscordSendSpeedtestCompletedNotification::class,
DiscordSendSpeedtestThresholdNotification::class,
// Mail notification listeners
MailSendSpeedtestCompletedNotification::class,
MailSendSpeedtestThresholdNotification::class,
// Telegram notification listeners
TelegramSendSpeedtestCompletedNotification::class,
TelegramSendSpeedtestThresholdNotification::class,
// Webhook notification listeners
WebhookSendSpeedtestCompletedNotification::class,
WebhookSendSpeedtestThresholdNotification::class,
],
SpeedtestFailed::class => [
// nothing yet...
],
SpeedtestStarted::class => [
// nothing yet...
],
];
/**
* Register any events for your application.
*/
public function boot(): void
{
//
}
/**
* Determine if events and listeners should be automatically discovered.
*/
public function shouldDiscoverEvents(): bool
{
return false;
}
}