F
F
fLipE2019-03-26 14:15:39
Laravel
fLipE, 2019-03-26 14:15:39

Is it possible to use Laratrust with Laravel Policies, or are they mutually exclusive?

The challenge is to implement user roles and groups. It is necessary to determine the rights to access sections and perform certain actions. Also, a group (or role) can influence the display of various information.
Initially, I wanted to use Laratrust for this, but the built-in policies are somehow more familiar.
It would be much more convenient to check for the presence of a role in a policy, but the laratrust trait overloads the can() method in the User model.
Tell me, how do you solve such problems with the differentiation of access rights? (:

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Wells, 2019-03-26
@fLipE

I'm using bouncer . But, judging by the github, laratrust is also friends with gates and politicians (I still recommend bouncer).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question