Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

laravel 5.3 @role fails #43

Closed
ThePoet444 opened this issue Oct 1, 2016 · 2 comments
Closed

laravel 5.3 @role fails #43

ThePoet444 opened this issue Oct 1, 2016 · 2 comments

Comments

@ThePoet444
Copy link

If I try @can() in my blade template. It works just fine. Trying @ROLE('admin') gives me this error:

Type error: Argument 1 passed to Illuminate\Database\Eloquent\Model::is() must be an instance of Illuminate\Database\Eloquent\Model, string given, called in /home/vagrant/Code/rs53/vendor/caffeinated/shinobi/src/Shinobi.php on line 77 (View: /home/vagrant/Code/rs53/resources/views/home.blade.php)

I am using "caffeinated/shinobi": "^3.0", in my composer file. All instructions followed as well. I'm sure I borked something, I just can't figure out what.

@ThePoet444 ThePoet444 changed the title laravel 5.2 @role fails laravel 5.3 @role fails Oct 1, 2016
@ThePoet444
Copy link
Author

changing line 77 of Shinobi.php to isRole() solved the issue. Not sure if this was the preferred way of handling it, but it works.

@bretto36
Copy link
Contributor

bretto36 commented Oct 2, 2016

Yes, this just went out in a PR 3 days ago. Should all be good now

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

3 participants