Hi Guys,
I have a question about the naming convention of the tables. We have multiple tables with should have the same name. We have a application with news, vacancies, locations etc.
All of those are cannected to a category. What should your database tables look like?
I think it's important to keep Eloquent and pivot tables in mind in this decision. I'd like to hear your opinion on this.
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
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?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community