Path: blob/1.0-develop/app/Providers/EventServiceProvider.php
7432 views
<?php12namespace Pterodactyl\Providers;34use Pterodactyl\Models\User;5use Pterodactyl\Models\Server;6use Pterodactyl\Models\Subuser;7use Pterodactyl\Models\EggVariable;8use Pterodactyl\Observers\UserObserver;9use Pterodactyl\Observers\ServerObserver;10use Pterodactyl\Observers\SubuserObserver;11use Pterodactyl\Observers\EggVariableObserver;12use Pterodactyl\Listeners\Auth\AuthenticationListener;13use Pterodactyl\Events\Server\Installed as ServerInstalledEvent;14use Pterodactyl\Notifications\ServerInstalled as ServerInstalledNotification;15use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;1617class EventServiceProvider extends ServiceProvider18{19/**20* The event to listener mappings for the application.21*/22protected $listen = [23ServerInstalledEvent::class => [ServerInstalledNotification::class],24];2526protected $subscribe = [27AuthenticationListener::class,28];2930/**31* Register any events for your application.32*/33public function boot(): void34{35parent::boot();3637User::observe(UserObserver::class);38Server::observe(ServerObserver::class);39Subuser::observe(SubuserObserver::class);40EggVariable::observe(EggVariableObserver::class);41}42}434445