protected function disableDefaultCurrency()
    {
        $obCurrencyList = Currency::isDefault()->get();
        if ($obCurrencyList->isEmpty()) {
            return;
        }

        /** @var Currency $obCurrency */
        foreach ($obCurrencyList as $obCurrency) {
            if ($obCurrency->id == $this->id) {
                continue;
            }

            $obCurrency->is_default = false;
            $obCurrency->save();
        }
    }
protected function disableDefaultCurrency()
    {
        $obCurrencyList = Currency::isDefault()->get();
        if ($obCurrencyList->isEmpty()) {
            return;
        }

        /** @var Currency $obCurrency */
        foreach ($obCurrencyList as $obCurrency) {
            if ($obCurrency->id == $this->id) {
                continue;
            }

            $obCurrency->is_default = false;
            $obCurrency->save();
        }
    }
protected function disableDefaultCurrency ( ) { $ obCurrencyList = Currency :: isDefault ( ) -> get ( ) ; if ( $ obCurrencyList -> isEmpty ( ) ) { return ; } /** @var Currency $obCurrency */ foreach ( $ obCurrencyList as $ obCurrency ) { if ( $ obCurrency -> id == $ this -> id ) { continue ; } $ obCurrency -> is_default = false ; $ obCurrency -> save ( ) ; } }
Disable default currency, because only one can be an active currency
Disable default currency because only one can be an active currency