mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 11:14:40 -04:00
Working on products api
This commit is contained in:
parent
1e8a4c2b70
commit
1f36e175dd
@ -29,11 +29,12 @@ class ProductApiController extends BaseAPIController
|
||||
|
||||
public function index()
|
||||
{
|
||||
$products = Product::scope()->withTrashed();
|
||||
$products = $products->orderBy('created_at', 'desc')->paginate();
|
||||
//$products = Product::scope()->withTrashed()->orderBy('created_at', 'desc')->paginate();
|
||||
//$products = $products
|
||||
|
||||
$products = Product::scope()->withTrashed()->paginate();
|
||||
$transformer = new ProductTransformer(\Auth::user()->account, $this->serializer);
|
||||
$data = $this->includeCollection($products, $transformer, 'products', $products->paginate());
|
||||
$data = $this->includeCollection($products, $transformer, 'products');
|
||||
|
||||
return $this->response($data);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user