Fix typo in RelationController (original #2460)

Fixes minor typo initially proposed in #2460, resubmitted here as original author vanished.
This commit is contained in:
Luke Towers 2017-01-28 15:47:25 -06:00 committed by GitHub
parent e7609aa5e8
commit a3b98944be
1 changed files with 2 additions and 2 deletions

View File

@ -1243,10 +1243,10 @@ class RelationController extends ControllerBehavior
* Save data to models
*/
$foreignKeyName = $this->relationModel->getQualifiedKeyName();
$hyrdatedModels = $this->relationObject->whereIn($foreignKeyName, $foreignIds)->get();
$hydratedModels = $this->relationObject->whereIn($foreignKeyName, $foreignIds)->get();
$saveData = $this->pivotWidget->getSaveData();
foreach ($hyrdatedModels as $hydratedModel) {
foreach ($hydratedModels as $hydratedModel) {
$modelsToSave = $this->prepareModelsToSave($hydratedModel, $saveData);
foreach ($modelsToSave as $modelToSave) {
$modelToSave->save(null, $this->pivotWidget->getSessionKey());