/** * Set the value of the "created at" attribute. * * @param mixed $value * @return void */ public function setCreatedAt($value) { $this->{static::CREATED_AT} = $value; if (!$value instanceof Carbon) { $value = new Carbon($value); } $this->{static::CREATED_AT . '_gmt'} = $value->timezone('GMT'); }