public function update(array $data, $Setting = null)
  {
    if(empty($Setting))
    {
      $Setting = $this->byId($data['id']);
    }

    foreach ($data as $key => $value)
    {
      $Setting->$key = $value;
    }

    $Setting->save();

    return $Setting;
  }
public function update(array $data, $Setting = null)
  {
    if(empty($Setting))
    {
      $Setting = $this->byId($data['id']);
    }

    foreach ($data as $key => $value)
    {
      $Setting->$key = $value;
    }

    $Setting->save();

    return $Setting;
  }
public function update ( array $ data , $ Setting = null ) { if ( empty ( $ Setting ) ) { $ Setting = $ this -> byId ( $ data [ 'id' ] ) ; } foreach ( $ data as $ key => $ value ) { $ Setting -> $ key = $ value ; } $ Setting -> save ( ) ; return $ Setting ; }
Update an existing set of settings

@param array $data
An array as follows: array('initial_year'=>$initialYear, 'create_opening_period'=>$createOpeningPeriod, 'create_closing_period'=>$createClosingPeriod, 'is_configured'=>$isConfigured,
'currency_id'=>$currencyId, 'account_chart_type_id'=>$accountChartTypeId, 'organization_id'=>$organizationId
);

@param Mgallegos\DecimaAccounting\Setting $Setting

@return Mgallegos\DecimaAccounting\Setting
Update an existing set of settings