<?php

namespace Modules\Team\Models\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class TeamResource extends JsonResource
{
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'name' => optional($this->currentDescription)->name,
            'job' => optional($this->currentDescription)->job,
            'image' => $this->image,
        ];
    }
}

