src/Aindong/Pluggables/Pluggables.php
public function getByEnabled($enabled = true)
    {
        $disabledPluggables = [];
        $enabledPluggables = [];

        $pluggables = $this->all();

        // Iterate through each pluggable
        foreach ($pluggables as $pluggable) {
            if ($this->isEnabled($pluggable['slug'])) {
                $enabledPluggables[] = $pluggable;
            } else {
                $disabledPluggables[] = $pluggable;
            }
        }

        if ($enabled === true) {
            return $this->sortByOrder($enabledPluggables);
        }

        return $this->sortByOrder($disabledPluggables);
    }
public function getByEnabled($enabled = true)
    {
        $disabledPluggables = [];
        $enabledPluggables = [];

        $pluggables = $this->all();

        // Iterate through each pluggable
        foreach ($pluggables as $pluggable) {
            if ($this->isEnabled($pluggable['slug'])) {
                $enabledPluggables[] = $pluggable;
            } else {
                $disabledPluggables[] = $pluggable;
            }
        }

        if ($enabled === true) {
            return $this->sortByOrder($enabledPluggables);
        }

        return $this->sortByOrder($disabledPluggables);
    }
public function getByEnabled ( $ enabled = true ) { $ disabledPluggables = [ ] ; $ enabledPluggables = [ ] ; $ pluggables = $ this -> all ( ) ; // Iterate through each pluggable foreach ( $ pluggables as $ pluggable ) { if ( $ this -> isEnabled ( $ pluggable [ 'slug' ] ) ) { $ enabledPluggables [ ] = $ pluggable ; } else { $ disabledPluggables [ ] = $ pluggable ; } } if ( $ enabled === true ) { return $ this -> sortByOrder ( $ enabledPluggables ) ; } return $ this -> sortByOrder ( $ disabledPluggables ) ; }
Find a pluggable with enabled status given.

@param bool $enabled

@return array
Find a pluggable with enabled status given .