Skip to content

Commit

Permalink
Add brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
aboudeh87 committed Sep 9, 2016
1 parent 661da90 commit d01fab5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/RolesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function registerBladeExtensions()
$blade->directive('role',
function ($expression)
{
return "<?php if (Auth::check() && Auth::user()->is{$expression}): ?>";
return "<?php if (Auth::check() && Auth::user()->isRole({$expression})): ?>";
});

$blade->directive('endrole',
Expand All @@ -61,7 +61,7 @@ function ()
$blade->directive('permission',
function ($expression)
{
return "<?php if (Auth::check() && Auth::user()->can{$expression}): ?>";
return "<?php if (Auth::check() && Auth::user()->can({$expression})): ?>";
});

$blade->directive('endpermission',
Expand All @@ -87,7 +87,7 @@ function ()
$blade->directive('allowed',
function ($expression)
{
return "<?php if (Auth::check() && Auth::user()->allowed{$expression}): ?>";
return "<?php if (Auth::check() && Auth::user()->allowed({$expression})): ?>";
});

$blade->directive('endallowed',
Expand Down

0 comments on commit d01fab5

Please sign in to comment.