simioluwatomi
7 months ago

How do I fetch this relationship

Posted 7 months ago by simioluwatomi

I have this Database structure

countries
    id - integer
    name - string

users
    id - integer
    name - string

posts
    id - integer
    user_id - integer
    country_id - integer
    title - string

Is it possible to get users->countries using the posts relationship? Thanks

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