File: D:/HostingSpaces/Lacom/lacom.nl/database/migrations/2018_06_22_075112_create_employees_table.php
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEmployeesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('employees', function (Blueprint $table) {
$table->increments('id');
$table->integer('site_id')->unsigned();
$table->boolean('active');
$table->string('name');
$table->integer('lft')->nullable();
$table->integer('rgt')->nullable();
$table->integer('tree')->nullable();
$table->timestamps();
$table->foreign('site_id')->references('id')->on('sites');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('employees');
}
}