Skip to content

Conversation

@bencorlett
Copy link
Contributor

Hi,

Let's say you have the following form:

<form>
    <input type="text" name="user[first_name]" value="{{ Input::old('user.first_name') }}">
</form>

This will not work under the current session implementation as the keys are limited to 1 deep, i.e. 'user' or 'user_first_name', but not 'user.first_name'. I have implemented array_set, array_get and array_forget (illuminate/support is already a dependency of illuminate/session so no issues there) to allow multi-dimensional arrays to be set.

There are several use-cases where you may wish to set / access multi-dimensional session data, HTML forms are but one of them.

  • Ben

taylorotwell added a commit that referenced this pull request Feb 5, 2013
Allowing dot-notation arrays to be used in session data.
@taylorotwell taylorotwell merged commit 206d8c1 into laravel:master Feb 5, 2013
@bencorlett bencorlett deleted the feature/deep-sessions branch February 27, 2013 22:31
joelharkes pushed a commit to joelharkes/framework_old that referenced this pull request Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants