<?php

namespace Modules\User\Http\Resources\Favorite;

use Illuminate\Http\Resources\Json\JsonResource;
use Modules\Cms\Http\Resources\ArticleBaseResource;

class FavoriteResource extends JsonResource
{

    public function toArray($request): array
    {
        return [
            'favorite_id'  => $this->id,
            'favoriteable' => new ArticleBaseResource($this->favoriteable)
        ];
    }

}