Skip to content

Instantly share code, notes, and snippets.

@devmeireles
Created April 22, 2019 20:19
Show Gist options
  • Save devmeireles/fbfa75a32bf56afc51d19e93b16e1044 to your computer and use it in GitHub Desktop.
Save devmeireles/fbfa75a32bf56afc51d19e93b16e1044 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 TableBooks extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('books', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('title',200);
$table->string('author',200);
$table->text('description');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('books');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment