more n+1 fixes

This commit is contained in:
Denis Duliçi
2023-04-13 11:35:31 +03:00
parent 54b5960b84
commit bf874d1a65
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ class Bills extends Controller
*/
public function index()
{
$bills = Document::bill()->with('contact', 'transactions')->collect(['issued_at' => 'desc']);
$bills = Document::bill()->with('contact', 'items', 'last_history', 'transactions')->collect(['issued_at' => 'desc']);
return $this->response('purchases.bills.index', compact('bills'));
}