Skip to content

Commit

Permalink
Merge pull request #19 from derhaeuptling/feature/more-api-fields
Browse files Browse the repository at this point in the history
more api fields
  • Loading branch information
m-vo authored Jun 29, 2020
2 parents 4295d29 + 0aad446 commit e3e5c12
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ protected function getFormatted(RealEstate $realEstate, string $attribute): ?str
);
}

// flatten arrays to comma separated values
if (\is_array($rawValue)) {
return implode(', ', $rawValue);
}

// parse dates
if ($rawValue instanceof \DateTime) {
return $rawValue->format('d.m.Y H:i');
Expand Down
Loading

0 comments on commit e3e5c12

Please sign in to comment.