src/mako/database/midgard/relations/ManyToMany.php
public function updateLink($id, array $attributes): bool
	{
		$success = true;

		$foreignKey = $this->getForeignKey();

		$foreignKeyValue = $this->parent->getPrimaryKeyValue();

		$junctionKey = $this->getJunctionKey();

		foreach($this->getJunctionKeys($id) as $key => $id)
		{
			$success = $success && (bool) $this->junction()->where($foreignKey, '=', $foreignKeyValue)->where($junctionKey, '=', $id)->update($this->getJunctionAttributes($key, $attributes));
		}

		return $success;
	}
public function updateLink($id, array $attributes): bool
	{
		$success = true;

		$foreignKey = $this->getForeignKey();

		$foreignKeyValue = $this->parent->getPrimaryKeyValue();

		$junctionKey = $this->getJunctionKey();

		foreach($this->getJunctionKeys($id) as $key => $id)
		{
			$success = $success && (bool) $this->junction()->where($foreignKey, '=', $foreignKeyValue)->where($junctionKey, '=', $id)->update($this->getJunctionAttributes($key, $attributes));
		}

		return $success;
	}
public function updateLink ( $ id , array $ attributes ) : bool { $ success = true ; $ foreignKey = $ this -> getForeignKey ( ) ; $ foreignKeyValue = $ this -> parent -> getPrimaryKeyValue ( ) ; $ junctionKey = $ this -> getJunctionKey ( ) ; foreach ( $ this -> getJunctionKeys ( $ id ) as $ key => $ id ) { $ success = $ success && ( bool ) $ this -> junction ( ) -> where ( $ foreignKey , '=' , $ foreignKeyValue ) -> where ( $ junctionKey , '=' , $ id ) -> update ( $ this -> getJunctionAttributes ( $ key , $ attributes ) ) ; } return $ success ; }
Updates junction attributes.

@param  mixed $id         Id, model or an array of ids and/or models
@param  array $attributes Junction attributes
@return bool
Updates junction attributes .