File "VariationResource.php"

Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/app/Http/Resources/Admin/VariationResource.php
File size: 671 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace App\Http\Resources\Admin;

use Illuminate\Http\Resources\Json\JsonResource;

class VariationResource extends JsonResource
{
    public function toArray($request)
    {
        return [
            "id" => $this->id,
            "type" => $this->type,
            "value" => $this->value,
            "vendor_id" => $this->vendor_id,
            "vendor_name" => $this->vendor?->name,
            "vendor_price" => $this->vendor_price,
            "sku" => $this->sku,
            "status" => $this->status,
            "created_at" => $this->created_at->format('m-d-Y'),
            "updated_at" => $this->updated_at->format('m-d-Y'),
        ];
    }
}