Skip to content

Commit 96727e6

Browse files
committed
Merge pull request #109 from MAXakaWIZARD/pr-fix-docs
Fix wrong example in docs
2 parents 8ec2b2f + 660d83c commit 96727e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Resources/doc/index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ information in your development environment, for instance:
9494
->geocode($request->server->get('REMOTE_ADDR'));
9595

9696
// Find the 5 nearest objects (15km) from the current user.
97+
$address = $result->first();
9798
$objects = ObjectQuery::create()
98-
->filterByDistanceFrom($result->getLatitude(), $result->getLongitude(), 15)
99+
->filterByDistanceFrom($address->getLatitude(), $address->getLongitude(), 15)
99100
->limit(5)
100101
->find();
101102

0 commit comments

Comments
 (0)