<?php

namespace App\Http\Resources\Jobseeker;

use Illuminate\Http\Resources\Json\JsonResource;

class Notifications 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,
            'description' => $this->description,
            'is_read'     => $this->is_read,
            'name'        => $this->name,
            'created_at'  => date('F d, Y h:i A', strtotime($this->created_at)),
            'type'        => $this->type,
        ];
    }
}
