Skip to content

Instantly share code, notes, and snippets.

@maxca
Created May 31, 2018 01:28
Show Gist options
  • Select an option

  • Save maxca/a12e40fc8f936e6b0e28d243176790a7 to your computer and use it in GitHub Desktop.

Select an option

Save maxca/a12e40fc8f936e6b0e28d243176790a7 to your computer and use it in GitHub Desktop.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTableBlog extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blog', function (Blueprint $table) {
$table->increments('id');
$table->string('topic');
$table->text('detail');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('blog');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment