public function getFeatures($array = true) { if ($array) { return $this->features->toArray(); } else { return $this->features; } }