Skip to content

Instantly share code, notes, and snippets.

@nissicreative
Created March 6, 2017 21:40
Show Gist options
  • Save nissicreative/262935420471fc519d8baca34137473c to your computer and use it in GitHub Desktop.
Save nissicreative/262935420471fc519d8baca34137473c to your computer and use it in GitHub Desktop.
Laravel Countries Table Migration
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCountriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('countries', function (Blueprint $table) {
$table->increments('id');
$table->string('code');
$table->string('name');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('countries');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment