<?php

namespace Modules\User\Http\Resources\Favorite;

use App\Api\Resources\BaseCollection;

class FavoriteCollection extends BaseCollection
{

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

}