Fix on invoices, add delivery reference, wip on dashboard concurrency requests designed on template
This commit is contained in:
@@ -31,4 +31,14 @@ class Invoice extends Model
|
||||
{
|
||||
return $this->belongsToThrough(Customer::class, Order::class, null, '', [Customer::class => 'customer_id', Order::class => 'order_id']);
|
||||
}
|
||||
|
||||
public function scopeByUUID($query, $uuid)
|
||||
{
|
||||
return $query->where('uuid', $uuid);
|
||||
}
|
||||
|
||||
public function scopeByPeriod($query, $start, $end)
|
||||
{
|
||||
return $query->whereBetween('created_at', [$start, $end]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user