Path: blob/1.0-develop/app/Events/ActivityLogged.php
10258 views
<?php12namespace Pterodactyl\Events;34use Illuminate\Support\Str;5use Pterodactyl\Models\ActivityLog;6use Illuminate\Database\Eloquent\Model;78class ActivityLogged extends Event9{10public function __construct(public ActivityLog $model)11{12}1314public function is(string $event): bool15{16return $this->model->event === $event;17}1819public function actor(): ?Model20{21return $this->isSystem() ? null : $this->model->actor;22}2324public function isServerEvent(): bool25{26return Str::startsWith($this->model->event, 'server:');27}2829public function isSystem(): bool30{31return is_null($this->model->actor_id);32}33}343536