Skip to content

Instantly share code, notes, and snippets.

@atrauzzi
Created May 12, 2013 03:06
Show Gist options
  • Save atrauzzi/5562267 to your computer and use it in GitHub Desktop.
Save atrauzzi/5562267 to your computer and use it in GitHub Desktop.
public function setSentAttribute($value) {
if($value instanceof DateTime)
$value = $value->format('Y-m-d H:i:s');
$this->attributes['sent'] = $value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment