database/migrations/2016_06_08_112913_create_fillings_table.php
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFillingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('fillings', function (Blueprint $table) {
$table->increments('id');
$table->text('text');
$table->integer('task_id')->unsigned();
$table->foreign('task_id')->references('id')->on('tasks');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('fillings');
}
}