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

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
romanbican committed Jun 18, 2015
1 parent b2b09c6 commit 5aaa00f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Bican/Roles/RolesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,27 @@ protected function registerBladeExtensions()
{
$blade = $this->app['view']->getEngineResolver()->resolve('blade')->getCompiler();

$blade->directive('role', function($expression) {
$blade->directive('role', function ($expression) {
return "<?php if (Auth::check() && Auth::user()->is{$expression}): ?>";
});

$blade->directive('endrole', function() {
$blade->directive('endrole', function () {
return "<?php endif; ?>";
});

$blade->directive('permission', function($expression) {
$blade->directive('permission', function ($expression) {
return "<?php if (Auth::check() && Auth::user()->can{$expression}): ?>";
});

$blade->directive('endpermission', function() {
$blade->directive('endpermission', function () {
return "<?php endif; ?>";
});

$blade->directive('allowed', function($expression) {
$blade->directive('allowed', function ($expression) {
return "<?php if (Auth::check() && Auth::user()->allowed{$expression}): ?>";
});

$blade->directive('endallowed', function() {
$blade->directive('endallowed', function () {
return "<?php endif; ?>";
});
}
Expand Down

0 comments on commit 5aaa00f

Please sign in to comment.