public function toArray($skip_empty = false, $include_original = true)
    {
        // Skip when no media
        if ($skip_empty === true && $this->hasMedia() === false) {
            return null;
        }

        $urls = [];

        foreach ($this->styles as $name => $style) {
            if ($include_original === false
                && $this->config('default_style') === $name
            ) {
                continue;
            }

            $urls[$name] = $this->url($name);
        }

        return $urls;
    }
public function toArray($skip_empty = false, $include_original = true)
    {
        // Skip when no media
        if ($skip_empty === true && $this->hasMedia() === false) {
            return null;
        }

        $urls = [];

        foreach ($this->styles as $name => $style) {
            if ($include_original === false
                && $this->config('default_style') === $name
            ) {
                continue;
            }

            $urls[$name] = $this->url($name);
        }

        return $urls;
    }
public function toArray ( $ skip_empty = false , $ include_original = true ) { // Skip when no media if ( $ skip_empty === true && $ this -> hasMedia ( ) === false ) { return null ; } $ urls = [ ] ; foreach ( $ this -> styles as $ name => $ style ) { if ( $ include_original === false && $ this -> config ( 'default_style' ) === $ name ) { continue ; } $ urls [ $ name ] = $ this -> url ( $ name ) ; } return $ urls ; }
Generates an array of all style urls.

@param bool $skip_empty
@param bool $include_original

@return array|null
Generates an array of all style urls .