Laravel prepare migration file for Polymorphic Relationships

Make morphs morphable_id morphable_type equivalent columns in one command, one to one, one to many relationships

1- The common way:

$table->unsignedBigInteger('morphable_id');
$table->string('morphable_type');
$table->index(['morphable_id', 'morphable_type']);

2- Shorthand

$table->morphs('morphable');
$table->dropMorphs('morphable');

Posting daily about Python, Nuclear Physicist PhD