Answer the question
In order to leave comments, you need to log in
How to generate a query in Yii2?
There is an article in the database, only the creator has access to it. That is, if you open a list of articles, then a person will see only his articles. In order to give access to the article, I created a new table in which I specify the user ID and article ID. How now to make a person see all the articles that he created and to which he was given access?
Answer the question
In order to leave comments, you need to log in
join tables with rights and condition by user ID
PS I recommend not to reinvent the wheel, but to use RBAC. For example, https://github.com/dektrium/yii2-user
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question