File "ContactQueryResource.php"
Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/app/Http/Resources/Admin/ContactQueryResource.php
File size: 720 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace App\Http\Resources\Admin;
use Illuminate\Http\Resources\Json\JsonResource;
class ContactQueryResource extends JsonResource
{
public function toArray($request)
{
return [
'id' => $this->id,
'name' => $this->name,
'email' => $this->email,
'phone' => $this->phone,
'subject' => $this->subject,
'message' => $this->message,
'is_read' => (bool) $this->is_read,
'department' => $this->department,
'location' => $this->location?->title,
'created_at' => $this->created_at->format('m-d-Y'),
'updated_at' => $this->updated_at->format('m-d-Y'),
];
}
}