foreignIdFor(JournalEntry::class)->index()->constrained()->cascadeOnUpdate()->cascadeOnDelete(); $table->unsignedInteger('journalable_id'); $table->string('journalable_type'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('journalables'); } }