src/mako/database/midgard/relations/ManyToMany.php
public function unlink($id = null): bool
	{
		$query = $this->junction()->where($this->getForeignKey(), '=', $this->parent->getPrimaryKeyValue());

		if($id !== null)
		{
			$query->in($this->getJunctionKey(), $this->getJunctionKeys($id));
		}

		return (bool) $query->delete();
	}
public function unlink($id = null): bool
	{
		$query = $this->junction()->where($this->getForeignKey(), '=', $this->parent->getPrimaryKeyValue());

		if($id !== null)
		{
			$query->in($this->getJunctionKey(), $this->getJunctionKeys($id));
		}

		return (bool) $query->delete();
	}
public function unlink ( $ id = null ) : bool { $ query = $ this -> junction ( ) -> where ( $ this -> getForeignKey ( ) , '=' , $ this -> parent -> getPrimaryKeyValue ( ) ) ; if ( $ id !== null ) { $ query -> in ( $ this -> getJunctionKey ( ) , $ this -> getJunctionKeys ( $ id ) ) ; } return ( bool ) $ query -> delete ( ) ; }
Unlinks related records.

@param  mixed $id Id, model or an array of ids and/or models
@return bool
Unlinks related records .