Skip to content

Commit

Permalink
Merge branch 'master' into 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
santigarcor committed Mar 29, 2023
2 parents 2cd62ba + 407d996 commit dac2906
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/docs/8.x/usage/blade-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Five directives are available for use within your Blade templates. What you give

@permission('manage-admins')
<p>This is visible to users with the given permissions. Gets translated to
\Laratrust::isAbleTo('manage-admins'). The @can directive is already taken by core
\Laratrust::hasPermission('manage-admins'). The @can directive is already taken by core
laravel authorization package, hence the @permission directive instead.</p>
@endpermission

Expand Down
2 changes: 1 addition & 1 deletion src/LaratrustServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private function registerBladeDirectives()

// Call to Laratrust::permission.
Blade::directive('permission', function ($expression) {
return "<?php if (app('laratrust')->isAbleTo({$expression})) : ?>";
return "<?php if (app('laratrust')->hasPermission({$expression})) : ?>";
});

// Call to Laratrust::ability.
Expand Down

0 comments on commit dac2906

Please sign in to comment.