laravel/laravel — pull request #698 by bencorlett (2012-05-23 02:38:09+00:00)
Title: Adding support for values in nested lists generated in the HTML class.

Hi fellas,

## Current Situation

Currently, the usage of `HTML::ul` and `HTML::ol` methods is like so:

```` php

first

second

third

````
-------------------

Nesting lists is done like so:

``` php

first

second

third

lorem

ipsum

````

## Proposal

This pull request enables the `HTML::listing` (the method that produces `HTML::ul` and `HTML::ol`) to display values for corresponding nested lists **in addition** to the already supported usage above. It doesn't touch the Laravel API and doesn't break backwards compatibility.

You might recognise this sort of stuff from dropdown menus:

```` php
array(
'lorem',
'ipsum',
),
);

echo HTML::ol($list);
````

The only difference between this and the examples before is that we now have a key for the `fourth` item. This produces the following hypertext markup:

```` html

first

second

third

fourth

lorem

ipsum

````

>Note: the list is only produced in this format if there is a key provided for the nested list array.

Thoughts on this?

Signed-off-by: Ben Corlett