bigIncrements('id'); $table->string('code')->nullable(); $table->string('name')->nullable(); $table->unsignedBigInteger('faculty_id'); $table->foreign('faculty_id')->references('id')->on('faculties'); }); // DB::table('departments')->insert( // array( // array('id' => '1','name' => 'BIOL', 'title' => 'Biolo'), // array('id' => '4','name' => 'CIAM', 'title' => ), // array('id' => '2','name' => 'FISI', 'title' => ), // array('id' => '3','name' => 'MATE', 'title' => ), // array('id' => '5','name' => 'PGCN', 'title' => ), // array('id' => '6','name' => 'QUIM', 'title' => ), // array('id' => '7','name' => 'default'), // )); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('departments'); } }