misc_pterodactyl-panel/app/Observers/ServerObserver.php
Matthew Penner cbcf62086f
Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
2022-10-14 10:59:20 -06:00

76 lines
1.5 KiB
PHP

<?php
namespace Pterodactyl\Observers;
use Pterodactyl\Events;
use Pterodactyl\Models\Server;
use Illuminate\Foundation\Bus\DispatchesJobs;
class ServerObserver
{
use DispatchesJobs;
/**
* Listen to the Server creating event.
*/
public function creating(Server $server): void
{
event(new Events\Server\Creating($server));
}
/**
* Listen to the Server created event.
*/
public function created(Server $server): void
{
event(new Events\Server\Created($server));
}
/**
* Listen to the Server deleting event.
*/
public function deleting(Server $server): void
{
event(new Events\Server\Deleting($server));
}
/**
* Listen to the Server deleted event.
*/
public function deleted(Server $server): void
{
event(new Events\Server\Deleted($server));
}
/**
* Listen to the Server saving event.
*/
public function saving(Server $server): void
{
event(new Events\Server\Saving($server));
}
/**
* Listen to the Server saved event.
*/
public function saved(Server $server): void
{
event(new Events\Server\Saved($server));
}
/**
* Listen to the Server updating event.
*/
public function updating(Server $server): void
{
event(new Events\Server\Updating($server));
}
/**
* Listen to the Server saved event.
*/
public function updated(Server $server): void
{
event(new Events\Server\Updated($server));
}
}