Query performance improvements for home
This commit is contained in:
parent
e9ada2468e
commit
6dab5bded8
@ -146,6 +146,7 @@ class User extends Authenticatable
|
|||||||
public function services()
|
public function services()
|
||||||
{
|
{
|
||||||
return $this->hasManyThrough(Service::class,Account::class)
|
return $this->hasManyThrough(Service::class,Account::class)
|
||||||
|
->with(['product.type'])
|
||||||
->active();
|
->active();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -607,6 +608,7 @@ class User extends Authenticatable
|
|||||||
DB::raw('ROUND(invoice_total-payments,2) AS balance'),
|
DB::raw('ROUND(invoice_total-payments,2) AS balance'),
|
||||||
])
|
])
|
||||||
->join('ab_invoice',['ab_invoice.id'=>'invoice_id'])
|
->join('ab_invoice',['ab_invoice.id'=>'invoice_id'])
|
||||||
|
->with(['items.taxes'])
|
||||||
->from($summary,'summary');
|
->from($summary,'summary');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<!-- $o=App\Models\User -->
|
||||||
<!-- Show outstanding invoices for all clients -->
|
<!-- Show outstanding invoices for all clients -->
|
||||||
<div class="card card-warning">
|
<div class="card card-warning">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<!-- $o=App\Models\User -->
|
||||||
<!-- Show active services -->
|
<!-- Show active services -->
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
Loading…
Reference in New Issue
Block a user