classes/Controllers/Elements.php
public function getPermissionOptions()
    {
        // Get all the grouped elements
        $elements = app('decoy.elements')
            ->localize(Decoy::locale())
            ->hydrate(true)
            ->asModels()
            ->sortBy('page_label')
            ->groupBy('page_label');

        // Map to the expected permisions forat
        $out = [];
        foreach ($elements as $page_label => $fields) {
            $out[Str::slug($page_label)] = [$page_label, $fields[0]->page_help];
        }

        return $out;
    }
public function getPermissionOptions()
    {
        // Get all the grouped elements
        $elements = app('decoy.elements')
            ->localize(Decoy::locale())
            ->hydrate(true)
            ->asModels()
            ->sortBy('page_label')
            ->groupBy('page_label');

        // Map to the expected permisions forat
        $out = [];
        foreach ($elements as $page_label => $fields) {
            $out[Str::slug($page_label)] = [$page_label, $fields[0]->page_help];
        }

        return $out;
    }
public function getPermissionOptions ( ) { // Get all the grouped elements $ elements = app ( 'decoy.elements' ) -> localize ( Decoy :: locale ( ) ) -> hydrate ( true ) -> asModels ( ) -> sortBy ( 'page_label' ) -> groupBy ( 'page_label' ) ; // Map to the expected permisions forat $ out = [ ] ; foreach ( $ elements as $ page_label => $ fields ) { $ out [ Str :: slug ( $ page_label ) ] = [ $ page_label , $ fields [ 0 ] -> page_help ] ; } return $ out ; }
The permissions options are a list of all the tabs

@return array
The permissions options are a list of all the tabs