2 months ago

Ignoration function

Posted 2 months ago by Mikegk


Im trying to implement some kind of ignoration function for loggedin users.

There is a table called 'user_ignore' which contains: -id -id_user (that's the ID of the user, who set the current entry) -id_foreign (...and the ID of the user who is ignored)

I have got many calls to my User Model, and each User belongs to many different aspects of the site. How can I assure, that a logged in user, will always get a filtered result based on the user_ignore contents?

It's important that the user who ignores, such as the user who is ignored won't "see" each other.

Global Scopes sounded like something I could have used, but I do not really know how to "join" data there - and if it's even possible.

Does anyone has an Idea how to deal with that Problem?

Thank you very much for any help.

Please sign in or create an account to participate in this conversation.