Skip to content

Instantly share code, notes, and snippets.

@birnam
Created April 9, 2014 17:52
Show Gist options
  • Save birnam/10296887 to your computer and use it in GitHub Desktop.
Save birnam/10296887 to your computer and use it in GitHub Desktop.
is this how to update a field in a migration that references other fields?
public function up()
{
$patientEvals = PatientEvaluation::all();
foreach ($patientEvals as $eval) {
$eval->pfsh['social_history']['tobacco_use'] =
$eval->pfsh['social_history']['cigarette_use'] + ' - ' +
$eval->pfsh['social_history']['tobacco_use'];
$eval->save();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment