I want to get some rows from posts table. I use eloquant and, I don't know how do I make it.
I have five tables :
- suspended_users (foreign_key - article_id -> post_translations.id)
- post_translations (post_id (
posts-reviewsorspecs) andpost_table) - posts (mean contents)
- reviews
- specs
I want to jump those three tables from suspended_users.
And I tried to below way inside of Suspect model.
But doesn't work!
$this->join("post_translations as pt", "pt.id", "=", "suspended_users.article_id")
->join($this->post_type." as p", "p.id", "=", "post_translations.post_id")
->select($this->post_type.".*")
->get();