2015-12-06 18:58:49 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Providers;
|
|
|
|
|
2022-05-15 18:40:19 +00:00
|
|
|
use Pterodactyl\Models\User;
|
|
|
|
use Pterodactyl\Models\Server;
|
|
|
|
use Pterodactyl\Models\Subuser;
|
|
|
|
use Pterodactyl\Models\EggVariable;
|
|
|
|
use Pterodactyl\Observers\UserObserver;
|
|
|
|
use Pterodactyl\Observers\ServerObserver;
|
|
|
|
use Pterodactyl\Observers\SubuserObserver;
|
|
|
|
use Pterodactyl\Observers\EggVariableObserver;
|
2018-07-01 21:34:40 +00:00
|
|
|
use Pterodactyl\Events\Server\Installed as ServerInstalledEvent;
|
|
|
|
use Pterodactyl\Notifications\ServerInstalled as ServerInstalledNotification;
|
2015-12-06 18:58:49 +00:00
|
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
|
|
|
|
|
|
|
class EventServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The event listener mappings for the application.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
2018-07-01 21:34:40 +00:00
|
|
|
protected $listen = [
|
|
|
|
ServerInstalledEvent::class => [
|
|
|
|
ServerInstalledNotification::class,
|
|
|
|
],
|
|
|
|
];
|
2022-05-15 18:40:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Boots the service provider and registers model event listeners.
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
parent::boot();
|
|
|
|
|
|
|
|
User::observe(UserObserver::class);
|
|
|
|
Server::observe(ServerObserver::class);
|
|
|
|
Subuser::observe(SubuserObserver::class);
|
|
|
|
EggVariable::observe(EggVariableObserver::class);
|
|
|
|
}
|
2015-12-06 18:58:49 +00:00
|
|
|
}
|