increments('id'); $table->integer('post_types_id')->unsigned(); $table->integer('user_id')->unsigned(); $table->timestamps(); $table->foreign('user_id') ->references('id') ->on('users'); $table->foreign('post_types_id') ->references('id') ->on('post_types'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('posts'); } }