D
D
DocTypeMaster2021-09-17 11:15:55
Laravel
DocTypeMaster, 2021-09-17 11:15:55

How to separate roles in laravel jetstream inertia and make admin panel?

Tell me how it is possible and necessary to separate the roles of the user and administrator in jetstream with inertia , I don’t need a ready-made solution, I just want to make a separate layout with the admin panel and give access there only to a certain role (administrator). If there is a link to the clarification of this issue, I will be very pleased)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jazzus, 2021-09-17
@jazzus

the simplest without roles is_admin add in users or check this id == 1 in model and check with policies https://laravel.com/docs/8.x/authorization

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question