protected function parseAssets($assets, $order = 0, $mode = 'default')
    {
        if (is_string($assets) && ! empty($assets)) {
            $assets = array($assets);
        } else if (! is_array($assets)) {
            return array();
        }

        return array_map(function ($asset) use ($order, $mode)
        {
            return compact('asset', 'order', 'mode');

        }, array_filter($assets, function ($value)
        {
            return ! empty($value);
        }));
    }
protected function parseAssets($assets, $order = 0, $mode = 'default')
    {
        if (is_string($assets) && ! empty($assets)) {
            $assets = array($assets);
        } else if (! is_array($assets)) {
            return array();
        }

        return array_map(function ($asset) use ($order, $mode)
        {
            return compact('asset', 'order', 'mode');

        }, array_filter($assets, function ($value)
        {
            return ! empty($value);
        }));
    }
protected function parseAssets ( $ assets , $ order = 0 , $ mode = 'default' ) { if ( is_string ( $ assets ) && ! empty ( $ assets ) ) { $ assets = array ( $ assets ) ; } else if ( ! is_array ( $ assets ) ) { return array ( ) ; } return array_map ( function ( $ asset ) use ( $ order , $ mode ) { return compact ( 'asset' , 'order' , 'mode' ) ; } , array_filter ( $ assets , function ( $ value ) { return ! empty ( $ value ) ; } ) ) ; }
Parses and returns the given assets.

@param  string|array $assets
@param  int $order
@param  string $mode

@return array
Parses and returns the given assets .