increments('id'); $table->string('name'); $table->timestamps(); }); Schema::create('role_user', function(Blueprint $table){ $table->unsignedInteger('user_id'); $table->unsignedInteger('role_id'); $table->primary(['user_id', 'role_id']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('roles'); Schema::drop('role_user'); } }