Query optimisations using with()
This commit is contained in:
@@ -8,7 +8,6 @@ class Invoice extends Model
|
||||
{
|
||||
protected $table = 'ab_invoice';
|
||||
protected $dates = ['date_orig','due_date'];
|
||||
protected $with = ['account.country.currency','items.taxes','paymentitems'];
|
||||
|
||||
protected $appends = [
|
||||
'date_due',
|
||||
@@ -25,6 +24,12 @@ class Invoice extends Model
|
||||
'total',
|
||||
];
|
||||
|
||||
protected $with = [
|
||||
'account.country.currency',
|
||||
'items.taxes',
|
||||
'paymentitems'
|
||||
];
|
||||
|
||||
private $_total = 0;
|
||||
private $_total_tax = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user