Skip to content

Commit

Permalink
Document n+1 issue fixed..
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Jun 13, 2023
1 parent 6641803 commit 1d183d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Purchases/Bills.php
Expand Up @@ -30,7 +30,7 @@ class Bills extends Controller
*/
public function index()
{
$bills = Document::bill()->with('contact', 'items', 'item_taxes', 'last_history', 'transactions', 'media')->collect(['issued_at' => 'desc']);
$bills = Document::bill()->with('contact', 'items', 'item_taxes', 'last_history', 'transactions', 'totals', 'histories', 'media')->collect(['issued_at' => 'desc']);

return $this->response('purchases.bills.index', compact('bills'));
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Sales/Invoices.php
Expand Up @@ -31,7 +31,7 @@ class Invoices extends Controller
*/
public function index()
{
$invoices = Document::invoice()->with('contact', 'items', 'item_taxes', 'last_history', 'transactions', 'media')->collect(['document_number'=> 'desc']);
$invoices = Document::invoice()->with('contact', 'items', 'item_taxes', 'last_history', 'transactions', 'totals', 'histories', 'media')->collect(['document_number'=> 'desc']);

return $this->response('sales.invoices.index', compact('invoices'));
}
Expand Down

0 comments on commit 1d183d9

Please sign in to comment.