hi friends
I am new to laravel. I am working on a project with complex query (complex to me :-) Please let me know how to approach this query thru eloquent or suggest any study material.
Tables
userTable
id
name
roleTable
id
name
role_user_table
role_id
user_id
topic_table
id
title
role_topic_table
role_id
topic_id
detail_table
id
content
topic_id // fk topic table
author_id // fk user table
Queries
Query 1
all topic_table where
atleast one role_id (of role_topic_table) matches with
atleast one role_id (of role_user_table) and
user_id = given_user_id
Query 2
all detail_table that belongs to topics selected in Query 1
or all detail_table where author_id = given_user_id
TIA
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community