Skip to content

Instantly share code, notes, and snippets.

@sagar-synergenie
Created February 14, 2018 12:06
Show Gist options
  • Save sagar-synergenie/35b46fb9836f1b1ac017e455256ac89e to your computer and use it in GitHub Desktop.
Save sagar-synergenie/35b46fb9836f1b1ac017e455256ac89e to your computer and use it in GitHub Desktop.
<?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', 5);
$table->string('name');
$table->string('phone_code');
$table->timestamps();
});
}
/**
* 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