sarga/packages/Webkul/API/Http/Resources/Customer/Wishlist.php

25 lines
614 B
PHP
Raw Normal View History

2019-03-13 11:17:52 +00:00
<?php
namespace Webkul\API\Http\Resources\Customer;
use Illuminate\Http\Resources\Json\JsonResource;
use Webkul\API\Http\Resources\Catalog\Product as ProductResource;
class Wishlist extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request
* @return array
*/
public function toArray($request)
{
return [
2020-02-19 11:24:04 +00:00
'id' => $this->id,
'product' => new ProductResource($this->product),
2019-03-13 11:17:52 +00:00
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
}
}