repository = $repository; } /** * Return a listing of all databases currently available to a single * server. * * @param \Pterodactyl\Models\Server $server * @return array */ public function index(Server $server): array { $databases = $this->repository->getDatabasesForServer($server->id); return $this->fractal->collection($databases) ->transformWith($this->getTransformer(ServerDatabaseTransformer::class)) ->toArray(); } }