src/Models/User.php
public function getManagedAbilities(): Collection
    {
        $abilities = $this->isA('superadmin') ? app('cortex.auth.ability')->all() : $this->getAbilities();

        return $abilities->groupBy('entity_type')->map->pluck('title', 'id')->sortKeys();
    }
public function getManagedAbilities(): Collection
    {
        $abilities = $this->isA('superadmin') ? app('cortex.auth.ability')->all() : $this->getAbilities();

        return $abilities->groupBy('entity_type')->map->pluck('title', 'id')->sortKeys();
    }
public function getManagedAbilities ( ) : Collection { $ abilities = $ this -> isA ( 'superadmin' ) ? app ( 'cortex.auth.ability' ) -> all ( ) : $ this -> getAbilities ( ) ; return $ abilities -> groupBy ( 'entity_type' ) -> map -> pluck ( 'title' , 'id' ) -> sortKeys ( ) ; }
Get managed abilites.

@return \Illuminate\Support\Collection
Get managed abilites .