toArray(); } /** * Return the servers associated with this user. * * @param \Pterodactyl\Models\User $user * @return bool|\League\Fractal\Resource\Collection * * @throws \Pterodactyl\Exceptions\PterodactylException */ public function includeServers(User $user) { if (! $this->authorize('server-list')) { return false; } $user->loadMissing('servers'); return $this->collection($user->getRelation('servers'), new ServerTransformer($this->getRequest()), 'server'); } }