mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Working on products api
This commit is contained in:
parent
32ed23cde7
commit
b93cd84052
@ -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…
Reference in New Issue
Block a user