models/CommonSettings.php
public static function getValue($sCode, $sDefaultValue = null)
    {
        if (empty($sCode)) {
            return $sDefaultValue;
        }

        //Get settings object
        $obSettings = static::where('item', static::SETTINGS_CODE)->first();
        if (empty($obSettings)) {
            return static::get($sCode, $sDefaultValue);
        }

        $sValue = $obSettings->$sCode;
        if (empty($sValue)) {
            return $sDefaultValue;
        }

        return $sValue;
    }
public static function getValue($sCode, $sDefaultValue = null)
    {
        if (empty($sCode)) {
            return $sDefaultValue;
        }

        //Get settings object
        $obSettings = static::where('item', static::SETTINGS_CODE)->first();
        if (empty($obSettings)) {
            return static::get($sCode, $sDefaultValue);
        }

        $sValue = $obSettings->$sCode;
        if (empty($sValue)) {
            return $sDefaultValue;
        }

        return $sValue;
    }
public static function getValue ( $ sCode , $ sDefaultValue = null ) { if ( empty ( $ sCode ) ) { return $ sDefaultValue ; } //Get settings object $ obSettings = static :: where ( 'item' , static :: SETTINGS_CODE ) -> first ( ) ; if ( empty ( $ obSettings ) ) { return static :: get ( $ sCode , $ sDefaultValue ) ; } $ sValue = $ obSettings -> $ sCode ; if ( empty ( $ sValue ) ) { return $ sDefaultValue ; } return $ sValue ; }
Get setting value
@param string $sCode
@param string $sDefaultValue
@return null|string
Get setting value