Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mootensai committed Oct 4, 2017
2 parents f8b4147 + 2a46105 commit dabc6bf
Showing 1 changed file with 31 additions and 26 deletions.
57 changes: 31 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Best work with [mootensai/yii2-enhanced-gii](https://github.com/mootensai/yii2-e

https://www.paypal.me/yohanesc

Endorse me on LinkedIn

https://www.linkedin.com/in/yohanes-candrajaya-b68394102/

## Installation

Expand Down Expand Up @@ -50,6 +53,34 @@ class MyModel extends ActiveRecord{

It takes a normal array of POST. This is the example
```php
Array (
$_POST['ParentClass'] => Array
(
[attr1] => value1
[attr2] => value2
// has many
[relationName] => Array
(
[0] => Array
(
[relAttr] => relValue1
)
[1] => Array
(
[relAttr] => relValue1
)
)
// has one
[relationName] => Array
(
[relAttr1] => relValue1
[relAttr2] => relValue2
)
)
)

OR

Array (
$_POST['ParentClass'] => ['attr1' => 'value1','attr2' => 'value2'],
// Has One
Expand All @@ -69,32 +100,6 @@ Array (
)
)
)

OR

$_POST['ParentClass'] = Array
(
[attr1] => value1
[attr2] => value2
// has many
[relationName] => Array
(
[0] => Array
(
[relAttr] => relValue1
)
[1] => Array
(
[relAttr] => relValue1
)
)
// has one
[relationName] => Array
(
[relAttr1] => relValue1
[relAttr2] => relValue2
)
);
```

```php
Expand Down

0 comments on commit dabc6bf

Please sign in to comment.