diff --git a/.gitignore b/.gitignore index 62b5eef..53e2ef0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.lock +.idea/ /vendor/ /tests/report/ \ No newline at end of file diff --git a/README.md b/README.md index a3bac3a..ce98e7f 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,8 @@ You can even set related models as associative arrays like this: ```php $project = Project::findOne(1); -$project->company = ['name' => 'GiHub', 'description' => 'Awesome']; +$project->company = ['name' => 'GiHub', 'description' => 'Awesome']; // Will create a new company record +// $project->company = ['id' => 3, 'name' => 'GiHub', 'description' => 'Awesome']; // Will update an existing company record $project->save(); ``` Attributes of the related model will be massively assigned using the `load() method. So remember to declare the according attributes as safe in the rules of the related model.