Skip to content

Commit ac8fc8f

Browse files
committed
Added documentation for related radius filter
1 parent 8543b6c commit ac8fc8f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,16 @@ use Cheesegrits\FilamentGoogleMaps\Actions\RadiusAction;
549549
}
550550
```
551551

552+
If your locations are in a related table, for example if you want to put a RadiusFilter on an 'events' table, and your
553+
locations are in a 'places' table, and you have a 'place' relationship on your Event model ...
554+
555+
```php
556+
RadiusFilter::make('radius')
557+
->attribute('places.location') // the relationship, with the computed location attribute
558+
->latitude('lat') // lat and lng fields on the related table (not optional)
559+
->longitude('lng')
560+
561+
```
552562
### Map Is Filter
553563

554564
See the Map Table Widget section below for details on how to use a map as a filter for a table.

0 commit comments

Comments
 (0)