protected function getPackages($type)
    {
        $packages = $this->packages->all();

        if (! is_null($type)) {
            $packages = $packages->where('type', $type);
        }

        $results = array();

        foreach ($packages->sortBy('basename') as $package) {
            $results[] = $this->getPackageInformation($package);
        }

        return array_filter($results);
    }
protected function getPackages($type)
    {
        $packages = $this->packages->all();

        if (! is_null($type)) {
            $packages = $packages->where('type', $type);
        }

        $results = array();

        foreach ($packages->sortBy('basename') as $package) {
            $results[] = $this->getPackageInformation($package);
        }

        return array_filter($results);
    }
protected function getPackages ( $ type ) { $ packages = $ this -> packages -> all ( ) ; if ( ! is_null ( $ type ) ) { $ packages = $ packages -> where ( 'type' , $ type ) ; } $ results = array ( ) ; foreach ( $ packages -> sortBy ( 'basename' ) as $ package ) { $ results [ ] = $ this -> getPackageInformation ( $ package ) ; } return array_filter ( $ results ) ; }
Get all Packages.

@return array
Get all Packages .