Working on products api
This commit is contained in:
parent
32ed23cde7
commit
b93cd84052
1 changed files with 3 additions and 1 deletions
|
|
@ -33,8 +33,10 @@ class ProductApiController extends BaseAPIController
|
|||
//$products = $products
|
||||
|
||||
$products = Product::scope()->withTrashed();
|
||||
$paginator = Product::scope()->withTrashed()->paginate();
|
||||
|
||||
$transformer = new ProductTransformer(\Auth::user()->account, $this->serializer);
|
||||
$data = $this->createCollection($products, $transformer, 'products', $products->paginate());
|
||||
$data = $this->createCollection($products, $transformer, 'products', $paginator);
|
||||
|
||||
return $this->response($data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue