Skip to content

Instantly share code, notes, and snippets.

@cwhite92
Created June 5, 2015 13:26
Show Gist options
  • Save cwhite92/c2801dea33a2607ae873 to your computer and use it in GitHub Desktop.
Save cwhite92/c2801dea33a2607ae873 to your computer and use it in GitHub Desktop.
class CarbonTrait {
public function __get($property) {
if (in_array($property, $this->accessMutateDates)) {
return new Carbon(parent::__get($property));
}
return parent::__get($property);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment