<?php

namespace App\Api\Resources\User;

use App\Api\Resources\BaseCollection;

class UserDataCollection extends BaseCollection
{

    public function toArray($request): array
    {
        return [
            'data' => $this->collection->map(function ($info) {
                return new UserDataResource($info);
            }),
            'page' => $this->page(),
        ];
    }

}