0

well, I'm working on a little project in which I'm using Many to Many relationship (users to comments by example). I'm trying to validate something, what if this auth user owns this comment? If I own this model, then I want to be able to modify it or delete it. That's the doubt I have.

I'm trying to be able to modify or delete a model in my Policy, but what I want to validate is if I own it or not in a Many to Many relationship.

  • Welcome to SO. First, you need to ask a question as should be asked. Check [here](https://stackoverflow.com/help/how-to-ask) how question should be asked how it would attract people to answer it. Personally I like to advice [this article](https://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) (also found near the bottom of the linked SO page above). Secondly, shouldn't that be one to many relation (as in one user can have many comments)? – Tpojka Aug 08 '23 at 21:55
  • Can you add your sample code and more context ? – xenooooo Aug 09 '23 at 03:11

0 Answers0