Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Cast/GeometryCast.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public function get($model, string $key, mixed $value, array $attributes)
if (! isset($value)) {
return null;
}

if ($value instanceof Geometry) {
return $value;
}

// Detect format: WKB data is hex-encoded, WKT is human-readable text
// After serialization, the model contains the WKB value, and we need to
Expand Down