Skip to content

Instantly share code, notes, and snippets.

@kargirwar
Created November 27, 2017 05:44
Show Gist options
  • Save kargirwar/0ff8b58de1fd56cc65e658f711988a6e to your computer and use it in GitHub Desktop.
Save kargirwar/0ff8b58de1fd56cc65e658f711988a6e to your computer and use it in GitHub Desktop.
<?php
public function change()
{
$table = $this->table('cameras');
$table->addColumn('name', 'string', ['length' => 200])
->addColumn('photographer-id', 'integer')
->addForeignKey('photographer-id', 'photographers', 'id')
->create();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment