<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class FirebaseNotifictionsResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id'    =>  HashIdObj()->encode($this->id),
            'image' =>  $this->image_full_path,
            'title'   =>  $this->title,
            'body'   =>  $this->body,
            'type'  =>  $this->type,
            'type_id'   =>  $this->item_id,
            'date_time'   =>  $this->created_at,
        ];
    }
}
