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

romanbican's avatar

[L5] Roles and permissions package

Hi!

When I was using Laravel 4, I have never find satisfying package which handles roles and permissions.

So, after Laravel 5 was released, I create my own package. Since you need to handle this "issue" in almost every larger project, you could try this one.

Since I'm relatively new to Laravel, I was trying to make it as simple as possible. I would be glad for any feedback!

Thanks!

Github repository - https://github.com/romanbican/roles

0 likes
1 reply
Valcristo's avatar

Hello

i have one problem with this package, i cant attach one role to a user

i really like to know how i can attach role to user with this package, i have one role create but this role how can attach to the user.

this is my store method.

public function store(Admin $request) {

    $user = Auth::user()->create($request->all());

    $user->attachRole('roles');

    return 'esta creado';
}

Please or to participate in this conversation.