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

Commit

Permalink
Merge pull request #45 from mgsmus/master
Browse files Browse the repository at this point in the history
Rename is() method to isRole() for Laravel 5.3 compatibility.
  • Loading branch information
kaidesu authored Oct 11, 2016
2 parents abcbd2e + 44cdeaf commit 4930aee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Shinobi.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ public function canAtLeast($permissions)
* @param string $slug
* @return bool
*/
public function is($role)
public function isRole($role)
{
if ($this->auth->check()) {
return $this->auth->user()->is($role);
return $this->auth->user()->isRole($role);
} else {
if ($role === 'guest') {
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/ShinobiServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected function registerBladeDirectives()
});

Blade::directive('role', function($expression) {
return "<?php if (\\Shinobi::is({$expression})): ?>";
return "<?php if (\\Shinobi::isRole({$expression})): ?>";
});

Blade::directive('endrole', function($expression) {
Expand Down

0 comments on commit 4930aee

Please sign in to comment.