src/mako/database/midgard/relations/ManyToMany.php
protected function getJunctionKeys($id): array
	{
		$ids = [];

		foreach((is_array($id) ? $id : [$id]) as $value)
		{
			if($value instanceof $this->model)
			{
				$value = $value->getPrimaryKeyValue();
			}

			$ids[] = $value;
		}

		return $ids;
	}
protected function getJunctionKeys($id): array
	{
		$ids = [];

		foreach((is_array($id) ? $id : [$id]) as $value)
		{
			if($value instanceof $this->model)
			{
				$value = $value->getPrimaryKeyValue();
			}

			$ids[] = $value;
		}

		return $ids;
	}
protected function getJunctionKeys ( $ id ) : array { $ ids = [ ] ; foreach ( ( is_array ( $ id ) ? $ id : [ $ id ] ) as $ value ) { if ( $ value instanceof $ this -> model ) { $ value = $ value -> getPrimaryKeyValue ( ) ; } $ ids [ ] = $ value ; } return $ ids ; }
Returns an array of ids.

@param  mixed $id Id, model or an array of ids and/or models
@return array
Returns an array of ids .