/** * Set foreign table name and key local column must reference to. Make sure local and foreign * column types are identical. * * @param string $table Foreign table name without database prefix (will be added * automatically). * @param string $column Foreign key name (id by default). * @return $this */ public function references($table, $column = 'id') { $this->foreignTable = $this->table->getTablePrefix() . $table; $this->foreignKey = $column; return $this; }