Skip to content

Instantly share code, notes, and snippets.

@artemrogov
Created January 19, 2018 08:17
Show Gist options
  • Save artemrogov/7344baeb4ebb5ba50bf05198418d6775 to your computer and use it in GitHub Desktop.
Save artemrogov/7344baeb4ebb5ba50bf05198418d6775 to your computer and use it in GitHub Desktop.
create_migration_tb
Schema::create('pages', function (Blueprint $table) {
$table->increments('id');
$table->string('name_page');
$table->string('meta_k');
$table->string('meta_d');
$table->text('content');
$table->integer('category_id')->unsigned();
$table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade');
$table->timestamps();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment