id('PostId'); $table->unsignedBigInteger('KategoriId'); $table->unsignedBigInteger('SubKategoriId'); $table->string('JudulPost'); $table->string('SlugPost'); $table->text('DescPost'); $table->string('ImagePost')->nullable(); $table->timestamps(); $table->foreign('KategoriId')->references('KategoriId')->on('Kategori')->onDelete('cascade'); $table->foreign('SubKategoriId')->references('SubKategoriId')->on('SubKategori')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('Post'); } };