public static function collectionFromString($string, $separator = '&', $assignment = '=', $options = ',')
    {
        $collection = [];

        if ( strlen(trim($string)) > 0 ) {
            static::explode($string, $separator)
                ->each(function ($item) use ($assignment, $options, &$collection) {
                    if (false === strpos($item, $assignment)) {
                        $collection[trim($item)] = true;
                        return;
                    }

                    list($key, $value) = explode($assignment, $item);

                    if (false !== strpos($value, $options)) {
                        $value = static::explode($value, $options)->trim()->toArray();
                    }

                    $collection[trim($key)] = $value;
                })
            ;
        }

        return new Collection($collection);
    }