public function scopeInvoices($query) { return $query->where('invoice_type_id', '=', INVOICE_TYPE_STANDARD)->where('is_recurring', '=', false); }