Relationship MORPH

Asked

Viewed 102 times

0

I’m modifying a table database, in case it is to be made a relationship Morph of the fields that are according to the image.

I’m wearing the Laravel 5.6

How do I make this relationship within Migration? inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

1 answer

1

The documentation says to do Morph like this

$table->morphs('taggable'); Adds taggable_id UNSIGNED BIGINT and  taggable_type VARCHAR equivalent columns.

in accordance with https://laravel.com/docs/5.6/migrations

Browser other questions tagged

You are not signed in. Login or sign up in order to post.