File "ReviewUserResource.php"
Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/app/Http/Resources/Admin/ReviewUserResource.php
File size: 649 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace App\Http\Resources\Admin;
use Illuminate\Http\Resources\Json\JsonResource;
class ReviewUserResource extends JsonResource
{
public function toArray($request)
{
return [
'id' => $this->id,
'product' => [
'product_id' => $this->product_id,
'name' => $this->product?->name,
],
// 'order_id' => $this->order_id,
'rating' => $this->rating,
'comment' => $this->comment,
'created_at' => $this->created_at->format('m-d-Y'),
'updated_at' => $this->updated_at->format('m-d-Y'),
];
}
}