Support the ongoing development of Laravel.io →
Database Architecture
Last updated 2 years ago.
0

The metable_type field is used with polymorphic relations, where the Eloquent class name is stored along with the key.

Check out http://laravel.com/docs/eloquent#polymorphic-relations for more.

This enables the link back from the meta table to the linked object, which could be different objects, say Post or Comment, or Category.

Last updated 2 years ago.
0

Thanks @allmyitjason, that seems a great help. I would like to ask whether the above approach should be used in my case - where I would have artists as user and artists can have bio, many audios, videos, images and other fields.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

efst efst Joined 2 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.