Performance workarounds as a result of 1bba21 - need to work on with()
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if($o->payments->where('date_orig','>',($x=\Carbon\Carbon::now()->subMonths(12)))->count())
|
||||
@if(($x=$o->payments()->where('ab_payment.date_orig','>',\Carbon\Carbon::now()->subMonths(12)->unix())->with(['items','account'])->get())->count())
|
||||
<table class="table table-bordered w-100" id="payments_past">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -19,7 +19,7 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($o->payments->where('date_orig','>',($x=\Carbon\Carbon::now()->subMonths(12))) as $oo)
|
||||
@foreach ($x as $oo)
|
||||
<tr>
|
||||
<td>{{ $oo->account->name }}</td>
|
||||
<td>{{ $oo->sid }}</td>
|
||||
|
Reference in New Issue
Block a user