Row level permissions in screens #2904
Unanswered
taiwanleaftea
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have users and some items, stored in "items" table. Items table has column "user_id". The user can edit only those items that belong to him.
I can get user's items with
Auth::user()->items()->get()
, and I can check if the item belongs to user using$item->user_id === Auth::user()->id
Where in the edit screen is better to do this check?
Beta Was this translation helpful? Give feedback.
All reactions