Add a resource and a collection for show CartItem.

This commit is contained in:
2023-06-20 20:13:44 +03:00
parent d5cd9f4096
commit 78c197549d
2 changed files with 47 additions and 0 deletions
@@ -0,0 +1,19 @@
<?php
namespace App\Http\Resources\API\v2;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\ResourceCollection;
class CartItemCollection extends ResourceCollection
{
/**
* Transform the resource collection into an array.
*
* @return array<int|string, mixed>
*/
public function toArray(Request $request): array
{
return parent::toArray($request);
}
}