src/Database/ORM/Traits/Mapping.php
/**
	 * Creates an `UPDATE` query builder that matches this model's target connection and primary key.
	 *
	 * @return UpdateHelper
	 */
Creates an `UPDATE` query builder that matches this model's target connection and primary key.
Creates an ` UPDATE ` query builder that matches this model ' s target connection and primary key .
protected function createUpdateQuery() {
		$connection = DB::connection($this->getConnection());
		$builder = $connection->update()->table($this->getTable());
		$key = $this->getPrimaryKey();
		$keyValue = $this->getPrimaryKeyValue();
		if (is_array($key)) {
			foreach ($key as $index => $keyName) {
				$builder->where($keyName, '=', $keyValue[$index]);
			}
		}
		else {
			$builder->where($key, '=', $keyValue);
		}
		return $builder;
	}
protected function createUpdateQuery ( ) { $ connection = DB :: connection ( $ this -> getConnection ( ) ) ; $ builder = $ connection -> update ( ) -> table ( $ this -> getTable ( ) ) ; $ key = $ this -> getPrimaryKey ( ) ; $ keyValue = $ this -> getPrimaryKeyValue ( ) ; if ( is_array ( $ key ) ) { foreach ( $ key as $ index => $ keyName ) { $ builder -> where ( $ keyName , '=' , $ keyValue [ $ index ] ) ; } } else { $ builder -> where ( $ key , '=' , $ keyValue ) ; } return $ builder ; }
Creates an `UPDATE` query builder that matches this model's target connection and primary key.
Creates an ` UPDATE ` query builder that matches this model ' s target connection and primary key .