public function __construct($param = null) { if (is_array($param)) { parent::__construct($param); if (array_key_exists("ID", $param) && array_key_exists("CODE", $param) && array_key_exists("NAME", $param)) { $this->ID = $param["ID"]; $this->CODE = $param["CODE"]; $this->NAME = $param["NAME"]; } } else { parent::__construct($param); } }
public static function updateWithFormularedValues($values, $object_id, $occur_date, $flow_phase) { $newData = [static::$idField => $object_id]; $attributes = static::getKeyColumns($newData, $occur_date, null); $values = array_merge($values, $newData); return parent::updateOrCreate($attributes, $values); }
public function __construct() { $this->isReservedName = config('database.default') === 'oracle'; parent::__construct(); }