src/Repositories/PermissionRepository.php
protected function prepareForPresentation()
    {
        if ($this->prepared) {
            return;
        }

        $this->permissionGroups       = new Collection;
        $this->ungroupedPermissions   = [];
        $this->groupedPermissionIndex = [];

        $this->loadPermissionsFromModules()
             ->loadCustomPermissions()
             ->loadCustomPermissionGroups()
             ->addUngroupedPermissionGroup()
             ->filterEmptyGroups();
    }
protected function prepareForPresentation()
    {
        if ($this->prepared) {
            return;
        }

        $this->permissionGroups       = new Collection;
        $this->ungroupedPermissions   = [];
        $this->groupedPermissionIndex = [];

        $this->loadPermissionsFromModules()
             ->loadCustomPermissions()
             ->loadCustomPermissionGroups()
             ->addUngroupedPermissionGroup()
             ->filterEmptyGroups();
    }
Prepares CMS data for presentation in the menu views.