4
I have this table structure and would like to know if who posted the thread or the reply is Member or moderator, but I couldn’t structure a relationship that works, someone can help me?
forum
id - integer
name - string
users
id - integer
name - string
threads
id - integer
user_id - integer
communitie_id - integer
title - string
body - text
replies
id - integer
thread_id - integer
author_id - integer
title - string
body - text
forum_user
forum_id - integer
user_id - integer
type - moderator/member/owner
What is the relationship between the entities ? You have to start there.
– gmsantos
community* which database you use?
– ranisalt
I use mysql, but using eloquent
– Daniel Lemes
The field
communitie_id
on the tablethreads
points to an item in the tableforum
, that’s it?– Cahe
@Oh yeah, I even edited the code.
– Daniel Lemes
Did you find a solution? Poste as an answer to help other people.
– Maniero