Skip to content

Allow setting model attributes of array type. #686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Allow setting model attributes of array type. #686

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 28, 2015

Consider the following code:

$model = new ModelName;
$model->foo = [ [ 'foo' => 'bar', 'baz' => [ 'foo' => 'bar' ] ] ];
$model->save();

Here we are setting a nested array as a model attribute.
Before this commit, the code above would have saved the "foo" property as an empty array.

Consider the following code:
    $model = new ModelName;
    $model->foo = [ [ 'foo' => 'bar', 'baz' => [ 'foo' => 'bar' ] ] ];
    $model->save();

Here we are setting a nested array as a model attribute. 
Before this commit, the code above would have saved the "foo" property as an empty array.
@pi0
Copy link
Contributor

pi0 commented Sep 1, 2016

There are breaking changes on master so unitTests are failing. would you please follow This steps to rebase this PR with master branch and running UnitTests against latest changes ?

Thanks :)

@pi0
Copy link
Contributor

pi0 commented Sep 1, 2016

Nice idea :D related to #926
@jenssegers would you please review this PRs ?

@pi0
Copy link
Contributor

pi0 commented Sep 1, 2016

@dmitrimaltsev tests are added, would you please merge dmitrimaltsev#1 ? :)

@jenssegers jenssegers closed this Jul 22, 2018
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