Last active
December 25, 2015 14:59
-
-
Save n00ge/6995256 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function push() | |
{ | |
foreach ($this->builtParentAssociations as $association => $model) { | |
if (! $model->save) { | |
return false; | |
} | |
// get foreign key for association off $this association and assign $model->getKey() | |
} | |
if (! parent::push()) { | |
return false; | |
} | |
foreach ($this->builtChildAssociations as $association => $model) { | |
// get foreign key for association off $model association and assign $this->id | |
if (! $model->save) { | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment