Customer and Vendor list page n+1 media
issue solved..
This commit is contained in:
parent
6539df1f1f
commit
a30ebc3b9f
@ -30,7 +30,7 @@ class Vendors extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$vendors = Contact::with('bills.histories', 'bills.totals', 'bills.transactions', 'media')->vendor()->collect();
|
||||
$vendors = Contact::with('media', 'bills.histories', 'bills.totals', 'bills.transactions', 'bills.media')->vendor()->collect();
|
||||
|
||||
return $this->response('purchases.vendors.index', compact('vendors'));
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class Customers extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$customers = Contact::customer()->with('invoices.histories', 'invoices.totals', 'invoices.transactions', 'media')->collect();
|
||||
$customers = Contact::customer()->with('media', 'invoices.histories', 'invoices.totals', 'invoices.transactions', 'invoices.media')->collect();
|
||||
|
||||
return $this->response('sales.customers.index', compact('customers'));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user