Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Providers/EventServiceProvider.php
7432 views
1
<?php
2
3
namespace Pterodactyl\Providers;
4
5
use Pterodactyl\Models\User;
6
use Pterodactyl\Models\Server;
7
use Pterodactyl\Models\Subuser;
8
use Pterodactyl\Models\EggVariable;
9
use Pterodactyl\Observers\UserObserver;
10
use Pterodactyl\Observers\ServerObserver;
11
use Pterodactyl\Observers\SubuserObserver;
12
use Pterodactyl\Observers\EggVariableObserver;
13
use Pterodactyl\Listeners\Auth\AuthenticationListener;
14
use Pterodactyl\Events\Server\Installed as ServerInstalledEvent;
15
use Pterodactyl\Notifications\ServerInstalled as ServerInstalledNotification;
16
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
17
18
class EventServiceProvider extends ServiceProvider
19
{
20
/**
21
* The event to listener mappings for the application.
22
*/
23
protected $listen = [
24
ServerInstalledEvent::class => [ServerInstalledNotification::class],
25
];
26
27
protected $subscribe = [
28
AuthenticationListener::class,
29
];
30
31
/**
32
* Register any events for your application.
33
*/
34
public function boot(): void
35
{
36
parent::boot();
37
38
User::observe(UserObserver::class);
39
Server::observe(ServerObserver::class);
40
Subuser::observe(SubuserObserver::class);
41
EggVariable::observe(EggVariableObserver::class);
42
}
43
}
44
45