public function toArray() { return array_where(get_object_vars($this), function ($key) { return !starts_with($key, '_'); }); }