public function getAssets($group = null, $raw = true)
    {
        // Spin through all of the assets that belong to the given group and push them on
        // to the end of the array.
        $assets = clone $this->directory->getAssets();

        foreach ($assets as $key => $asset)
        {
            if ( ! $raw and $asset->isRaw() or ! is_null($group) and ! $asset->{'is'.ucfirst(str_singular($group))}())
            {
                $assets->forget($key);
            }
        }

        // Spin through each of the assets and build an ordered array of assets. Once
        // we have the ordered array we'll transform it into a collection and apply
        // the collection wide filters to each asset.
        $ordered = array();

        foreach ($assets as $asset)
        {
            $this->orderAsset($asset, $ordered);
        }

        return new \Illuminate\Support\Collection($ordered);
    }
public function getAssets($group = null, $raw = true)
    {
        // Spin through all of the assets that belong to the given group and push them on
        // to the end of the array.
        $assets = clone $this->directory->getAssets();

        foreach ($assets as $key => $asset)
        {
            if ( ! $raw and $asset->isRaw() or ! is_null($group) and ! $asset->{'is'.ucfirst(str_singular($group))}())
            {
                $assets->forget($key);
            }
        }

        // Spin through each of the assets and build an ordered array of assets. Once
        // we have the ordered array we'll transform it into a collection and apply
        // the collection wide filters to each asset.
        $ordered = array();

        foreach ($assets as $asset)
        {
            $this->orderAsset($asset, $ordered);
        }

        return new \Illuminate\Support\Collection($ordered);
    }
public function getAssets ( $ group = null , $ raw = true ) { // Spin through all of the assets that belong to the given group and push them on // to the end of the array. $ assets = clone $ this -> directory -> getAssets ( ) ; foreach ( $ assets as $ key => $ asset ) { if ( ! $ raw and $ asset -> isRaw ( ) or ! is_null ( $ group ) and ! $ asset -> { 'is' . ucfirst ( str_singular ( $ group ) ) } ( ) ) { $ assets -> forget ( $ key ) ; } } // Spin through each of the assets and build an ordered array of assets. Once // we have the ordered array we'll transform it into a collection and apply // the collection wide filters to each asset. $ ordered = array ( ) ; foreach ( $ assets as $ asset ) { $ this -> orderAsset ( $ asset , $ ordered ) ; } return new \ Illuminate \ Support \ Collection ( $ ordered ) ; }
Get all the assets filtered by a group and if to include the raw assets.

@param  string  $group
@param  bool  $raw
@return \Illuminate\Support\Collection
Get all the assets filtered by a group and if to include the raw assets .