scope is added for the code field of BillTotal model

This commit is contained in:
Sevan Nerse 2020-11-11 13:22:50 +03:00
parent 66ac9eceb1
commit 5536866d4f

View File

@ -31,6 +31,11 @@ class BillTotal extends Model
return $this->belongsTo('App\Models\Purchase\Bill');
}
public function scopeCode($query, $code)
{
return $query->where('code', '=', $code);
}
/**
* Convert amount to double.
*