src/mako/database/midgard/ORM.php
protected function manyToMany(string $model, ?string $foreignKey = null, ?string $junctionTable = null, ?string $junctionKey = null): ManyToMany
	{
		$related = new $model;

		return new ManyToMany($related->getConnection(), $this, $related, $foreignKey, $junctionTable, $junctionKey);
	}
protected function manyToMany(string $model, ?string $foreignKey = null, ?string $junctionTable = null, ?string $junctionKey = null): ManyToMany
	{
		$related = new $model;

		return new ManyToMany($related->getConnection(), $this, $related, $foreignKey, $junctionTable, $junctionKey);
	}
protected function manyToMany ( string $ model , ? string $ foreignKey = null , ? string $ junctionTable = null , ? string $ junctionKey = null ) : ManyToMany { $ related = new $ model ; return new ManyToMany ( $ related -> getConnection ( ) , $ this , $ related , $ foreignKey , $ junctionTable , $ junctionKey ) ; }
Returns a ManyToMany relation.

@param  string                                      $model         Related model
@param  string|null                                 $foreignKey    Foreign key name
@param  string|null                                 $junctionTable Junction table name
@param  string|null                                 $junctionKey   Junction key name
@return \mako\database\midgard\relations\ManyToMany
Returns a ManyToMany relation .