mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on products api
This commit is contained in:
parent
43c6024f0f
commit
32ed23cde7
@ -32,9 +32,9 @@ class ProductApiController extends BaseAPIController
|
||||
//$products = Product::scope()->withTrashed()->orderBy('created_at', 'desc')->paginate();
|
||||
//$products = $products
|
||||
|
||||
$products = Product::scope()->withTrashed()->paginate();
|
||||
$products = Product::scope()->withTrashed();
|
||||
$transformer = new ProductTransformer(\Auth::user()->account, $this->serializer);
|
||||
$data = $this->createCollection($products, $transformer, 'products');
|
||||
$data = $this->createCollection($products, $transformer, 'products', $products->paginate());
|
||||
|
||||
return $this->response($data);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user