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

First of all your many-to-many relations should be defined with belongsToMany not hasMany. Next try to describe the relations in - what is related to what and why, and what you mean by using ... as default in posts..

Last updated 2 years ago.
0

jarektkaczyk said:

First of all your many-to-many relations should be defined with belongsToMany not hasMany. Next try to describe the relations in - what is related to what and why, and what you mean by using ... as default in posts..

I'll try to explain as good as i can with my bad english. RSS feeds are from different kind of blogs and i can check easily that "Okay this blog is mainly about food (category). Site is maintained by Bill Gates (people).".

My script checks those feeds if there is new posts and if there is, it will show them to me, but anything isn't yet saved to database yet. Cause feed had category "food" and it was maintained by "Bill Gates", we can assume that posts are about same thing so it will load "default" values from feed to posts. But at that point i can change, remove and add more values. Blog was about food but this post was about food and programming, and with Bill Gates there was couple of other guys. And when i have made my changes i save it and those are saved to post specific tables.

Things i may want to know. "List me all posts where Bill Gates is involved" or "List rss feeds where bill gates is involved" etc. I think now you got the point.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Jammae jammae Joined 13 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.