mostafamaklad / laravel-permission-mongodb

Associate users with roles and permissions using Laravel and MongoDB
https://maklad.dev
MIT License
112 stars 66 forks source link

When assigning a permission to a role the table with the permission relations won't create in my db #91

Closed McMazalf closed 4 years ago

McMazalf commented 5 years ago

Describe the bug When assigning a permission to a role the table with the permission relations won't create in my db

To Reproduce Steps to reproduce the behavior:

        $role = Role::find('5caf55e4c7a94421800024b4');
        $permission = Permission::find('5caf56c9c7a94421800024b5');

        $role->givePermissionTo($permission);
ludo1960 commented 5 years ago

I aint no expert, but try


$role = Role::where( '_id', '5caf55e4c7a94421800024b4') ;
same with permission