public function getHasManyReference($table, $key) { $table = $this->getColumnFromTable($table); return [sprintf($this->table, $key, $table), sprintf($this->foreign, $table, $key)]; }
public function getHasManyReference($table, $targetTable = NULL) { switch ("{$table}:{$targetTable}") { case 'posts:props': return [$targetTable, 'post_id']; } parent::getHasManyReference($table, $targetTable); }