I have a question about policies in Laravel. I know I can check userrights with the function can()
, as example can('edit-tasks')
; But I have an app with multiple projects. So user John Doe can edit tasks on project X, but not on project Y.
How can I do this in Laravel? I'm searching for a function like: can('edit_tasks', $user_id, $project_id)
.
How can I do this?