id(); $table->unsignedBigInteger('category_id'); $table->foreign('category_id') ->references('id') ->on('categories') ->onDelete('cascade'); $table->unsignedBigInteger('content_id'); $table->foreign('content_id') ->references('id') ->on('contents') ->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('category_content'); } }