Browse Source

Merge pull request #31 from solutosoft/relation-trait

Fixes `SaveRelationsTrait::load` method
tags/1.5.0
Alban Jubert 6 years ago committed by GitHub
parent
commit
7c65f5177f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/SaveRelationsTrait.php

4
src/SaveRelationsTrait.php

@ -8,8 +8,8 @@ trait SaveRelationsTrait
public function load($data, $formName = null) public function load($data, $formName = null)
{ {
$loaded = parent::load($data, $formName); $loaded = parent::load($data, $formName);
if ($loaded && method_exists($this, 'loadRelations')) { if ($loaded && $this->hasMethod('loadRelations')) {
$this->loadRelations($data, $formName = null); $this->loadRelations($data);
} }
return $loaded; return $loaded;
} }

Loading…
Cancel
Save