/** * Add a foreign key to a database table. * * In $options you can specify: on_delete = cascade, no_action .., * on_update, constraint = constraint name. * * @param string $columns * @param string $referencedTable * @param array $referencedColumns * @param array $options * * @return $this */ public function addForeignKey($columns, $referencedTable, $referencedColumns = ['id'], $options = []) { $this->table->addForeignKey($columns, $referencedTable, $referencedColumns, $options); return $this; }