public function getCreatedAtAttribute() { $time = strtotime($this->attributes['created_at']); return $time == false ? 0 : $time; }