<?php

namespace App\Http\Transformers;

use App\Models\Collections\ArtworkCatalogue;

class ArtworkCatalogueTransformer extends CollectionsTransformer
{

    public $excludeDates = true;
    public $excludeIdsAndTitle = true;

    /**
     * Turn this item object into a generic array.
     *
     * @param  \App\Agent  $item
     * @return array
     */
    public function transformFields($item)
    {
        return [
            'is_preferred' => (bool) $item->preferred,
            'catalogue' => $item->catalogue,
            'number' => $item->number,
            'state_edition' => $item->state_edition,
        ];
    }

}

<?php

namespace App\Http\Transformers;

use App\Models\Collections\ArtworkCatalogue;

class ArtworkCatalogueTransformer extends CollectionsTransformer
{

    public $excludeDates = true;
    public $excludeIdsAndTitle = true;

}

Fix override of ArtworkCatalogue's transform
Fix override of ArtworkCatalogue's transform

The model has an outbound structure that mimics the other pivot models,
but this outbound transformer was overwriting that output.
