src/Helpers.php
public static function toArray($value)
    {
        if (is_array($value)) {
            return $value;
        }

        if ($value instanceof Collection) {
            return $value->all();
        }

        return [$value];
    }
public static function toArray($value)
    {
        if (is_array($value)) {
            return $value;
        }

        if ($value instanceof Collection) {
            return $value->all();
        }

        return [$value];
    }
public static function toArray ( $ value ) { if ( is_array ( $ value ) ) { return $ value ; } if ( $ value instanceof Collection ) { return $ value -> all ( ) ; } return [ $ value ] ; }
Convert the given value to an array.

@param  mixed  $value
@return array
Convert the given value to an array .