public function can($permission, $operator = null)
    {
        // user permissions including
        // all of user role permissions
        $merge =  \Cache::remember(
            'acl.getMergeById_'.$this->id,
            config('acl.cacheMinutes'),
            function () {
                return $this->getPermissions();
            }
        );

        // lets call our base can() method
        // from role class. $merge already
        // has user & role permissions
        $model = config('acl.role', 'Kodeine\Acl\Models\Eloquent\Role');

        return (new $model)->can($permission, $operator, $merge);
    }
public function can($permission, $operator = null)
    {
        // user permissions including
        // all of user role permissions
        $merge =  \Cache::remember(
            'acl.getMergeById_'.$this->id,
            config('acl.cacheMinutes'),
            function () {
                return $this->getPermissions();
            }
        );

        // lets call our base can() method
        // from role class. $merge already
        // has user & role permissions
        $model = config('acl.role', 'Kodeine\Acl\Models\Eloquent\Role');

        return (new $model)->can($permission, $operator, $merge);
    }
public function can ( $ permission , $ operator = null ) { // user permissions including // all of user role permissions $ merge = \ Cache :: remember ( 'acl.getMergeById_' . $ this -> id , config ( 'acl.cacheMinutes' ) , function ( ) { return $ this -> getPermissions ( ) ; } ) ; // lets call our base can() method // from role class. $merge already // has user & role permissions $ model = config ( 'acl.role' , 'Kodeine\Acl\Models\Eloquent\Role' ) ; return ( new $ model ) -> can ( $ permission , $ operator , $ merge ) ; }
Check if User has the given permission.

@param  string $permission
@param  string $operator
@return bool
Check if User has the given permission .