1 year ago

Json type migration for foreign key collection

Posted 1 year ago by deepu07

Hi Folks,

Can anyone help me how to add JSON type column in migration for foreign key collection. I tried like this but somehow it is throwing error.

$table->json('tag_id'); $table->foreign('tag_id')->references('id')->on('tags');

Thanks in advance. Happy Holidays!

Please sign in or create an account to participate in this conversation.