protected function getPermissions()
    {
        try {
            return $this->cache->rememberForever('permissions.policies', function () {
                return Permission::with('roles')->get();
            });
        } catch (\Exception $exception) {
            $this->cache->forget('permissions.policies');

            return new Collection;
        }
    }
protected function getPermissions()
    {
        try {
            return $this->cache->rememberForever('permissions.policies', function () {
                return Permission::with('roles')->get();
            });
        } catch (\Exception $exception) {
            $this->cache->forget('permissions.policies');

            return new Collection;
        }
    }
protected function getPermissions ( ) { try { return $ this -> cache -> rememberForever ( 'permissions.policies' , function ( ) { return Permission :: with ( 'roles' ) -> get ( ) ; } ) ; } catch ( \ Exception $ exception ) { $ this -> cache -> forget ( 'permissions.policies' ) ; return new Collection ; } }
Get all permissions.

@return Collection
Get all permissions .