-
app/Observers/ServerObserver.php
Open in GitHubuse Pterodactyl\Events; use Pterodactyl\Models\Server; use Illuminate\Foundation\Bus\DispatchesJobs; class ServerObserver { use DispatchesJobs; public function creating(Server $server) { event(new Events\Server\Creating($server)); } public function created(Server $server) { event(new Events\Server\Created($server)); } public function deleting(Server $server) { event(new Events\Server\Deleting($server)); } public function deleted(Server $server) { event(new Events\Server\Deleted($server)); } public function saving(Server $server) { event(new Events\Server\Saving($server)); } public function saved(Server $server) { event(new Events\Server\Saved($server)); } public function updating(Server $server) { event(new Events\Server\Updating($server)); } public function updated(Server $server) { event(new Events\Server\Updated($server)); } }
-
app/Providers/AppServiceProvider.php
Open in GitHubuse Pterodactyl\Observers\ServerObserver; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { public function boot() { // Server::observe(ServerObserver::class); } // }