Laratrust\LaratrustRegistersBladeDirectives::registerWithoutParenthesis PHP Method

registerWithoutParenthesis() protected method

Registers the directives without parenthesis
protected registerWithoutParenthesis ( ) : void
return void
    protected function registerWithoutParenthesis()
    {
        // Call to Laratrust::hasRole
        Blade::directive('role', function ($expression) {
            return "<?php if (app('laratrust')->hasRole{$expression}) : ?>";
        });
        // Call to Laratrust::can
        Blade::directive('permission', function ($expression) {
            return "<?php if (app('laratrust')->can{$expression}) : ?>";
        });
        // Call to Laratrust::ability
        Blade::directive('ability', function ($expression) {
            return "<?php if (app('laratrust')->ability{$expression}) : ?>";
        });
    }