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

Depends totally on your app. Are those categories relevant to all the models you listed, or every model has its own categories type?

You may use polumorphic relations for this, just as taggable in the docs - be sure to read that http://laravel.com/docs/eloquent#polymorphic-relations

Last updated 2 years ago.
0

The categories are all on their own.

An other example: We have news photos. Both have comments. But there can only be one comments table!

What would you do?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

prodes prodes Joined 27 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.