diff --git a/app/Http/Resources/API/v2/CartItemCollection.php b/app/Http/Resources/API/v2/CartItemCollection.php new file mode 100644 index 0000000..ad08165 --- /dev/null +++ b/app/Http/Resources/API/v2/CartItemCollection.php @@ -0,0 +1,19 @@ + + */ + public function toArray(Request $request): array + { + return parent::toArray($request); + } +} diff --git a/app/Http/Resources/API/v2/CartItemResource.php b/app/Http/Resources/API/v2/CartItemResource.php new file mode 100644 index 0000000..7d3356a --- /dev/null +++ b/app/Http/Resources/API/v2/CartItemResource.php @@ -0,0 +1,28 @@ + + */ + public function toArray(Request $request): array + { + return [ + 'id' => $this->id, + 'uuid' => $this->uuid, + 'name' => $this->name, + 'url' => $this->url, + 'description' => $this->description, + 'price' => $this->price, + 'image' => $this->image, + 'count' => $this->count, + ]; + } +}