Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

ErrorException in HasRoleAndPermission.php line 104 #187

Closed
wstudios opened this issue Sep 3, 2016 · 2 comments
Closed

ErrorException in HasRoleAndPermission.php line 104 #187

wstudios opened this issue Sep 3, 2016 · 2 comments

Comments

@wstudios
Copy link

wstudios commented Sep 3, 2016

I am using laravel 5.3, I added the fixes in the pull requests so everything works great. The issue I have is when applying a role middleware to a route.

I am using this:
Route::group(['prefix' => 'office', 'middleware' => 'role:admin'], function()

It however throws the above error, here is some more on the error.

at HandleExceptions->handleError('8', 'Trying to get property of non-object', '......./vendor/bican/roles/src/Bican/Roles/Traits/HasRoleAndPermission.php', '104', array('key' => object(Role), 'value' => '0', 'role' => 'admin')) in HasRoleAndPermission.php line 104

Thanks for any help.

@nikolaynesov
Copy link

@wstudios #189
this should be the fix. Let me know if you still have any problems.

@wstudios
Copy link
Author

wstudios commented Sep 9, 2016

Thank you! Applying the fixes works great.

@wstudios wstudios closed this as completed Sep 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants