Answer the question
In order to leave comments, you need to log in
How to get data without connection?
return Project::find()
->leftJoin('project_user', 'project_user.project_id = project.id')
->select(['project.id', 'project.title'])
->where(['!=', 'project_user.user_id', $user_id])
->asArray()
->all();
$user_id
n't have a link in project_user
. How to do it? project_user
has a connection with another user (that is, if there are 1 or more records with this project).
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question