I have 3 tables
--- Posts (all the posts) rows = id, title, content
--- Boards (all the boards) rows = id, title
--- board_post (the link between boards and posts: many <-> many) rows = board_id, post_id
2 Eloquent classes named board and post
now I would love to select all the posts from a board, based on board_post
I was thinking in the way of:
Posts::whereIn('id', $board->post_ids())
how would I be able to do this, that first off that if I do Board::find(1)->post_ids I get all the post id's of that board
And then how wuld I be able to get all the post opbjects from that?
greetings Glenn