public function scopeInvoiceType($query, $typeId) { return $query->where('invoice_type_id', '=', $typeId); }