Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

app_dev's avatar

Laravel, how do control user roles ?

I want user roles.

admin/moderator/onlogged/offlogged

Is there a document to require which changes ?

I will arrange;

Model file, Migration file,

What other files should I edit ? Can you give me a clue ?

0 likes
1 reply
Snapey's avatar
Snapey
Best Answer
Level 122

Check Authorization in the docs.

Check these articles. https://laravel-news.com/tag/authorization

If you can, wait to implement this until you have more confidence. This is not something that can be messed with as the first task after creating a project.

1 like

Please or to participate in this conversation.