*/ class LifeEventCategory extends JsonResource { /** * Transform the resource into an array. * * @param \Illuminate\Http\Request $request * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable */ public function toArray($request) { return [ 'id' => $this->id, 'uuid' => $this->uuid, 'object' => 'lifeeventcategory', 'name' => $this->name, 'core_monica_data' => (bool) $this->core_monica_data, 'default_life_event_category_key' => $this->default_life_event_category_key, 'account' => [ 'id' => $this->account_id, ], 'created_at' => DateHelper::getTimestamp($this->created_at), 'updated_at' => DateHelper::getTimestamp($this->updated_at), ]; } }