mercredi 27 novembre 2019

Create a Many to Many Polymorphic relationship custom table

How can I create a Many to Many Polymorphic relationship using this table:

model_has_tags

$table->increments('id');
$table->integer('tag_id');
$table->string('model_type');
$table->integer('model_id');
$table->timestamps();

Tags

$table->increments('id');
$table->string('name');

Users

$table->increments('id');
$table->string('full_name');


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire