Question By
Unsolved

Role to edit specific posts by other users

jules-maestro

Oct 3rd, 2017 11:48 AM

<p>Hey Guys</p> <p>I am very new to Laravel and Voyager. I would like to have an implementation of a role that is able to edit records posted by specific users. **I need some pointers on how to achieve this**</p> <p>Eg. **Editor 1** can edit only posts/records by User 1, User 3, User 7, User 10 while **Editor 2** can have access to only posts/recorsd submitted by User 2, User 4, User 5, User 6, etc.</p> <p>Please pardon me if its a dumb or duplicate question</p> <p>Thanks</p>
mark

Oct 3rd, 2017 06:20 PM

You can do this using a Policy.

I made a small guide some weeks back: https://webman.io/blog/post/using-policies-in-laravel-voyager