From 8a1e08c7badf41f1b59d57290b2a4aa3ce32ac70 Mon Sep 17 00:00:00 2001 From: CodeWithDennis <23448484+CodeWithDennis@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:54:13 +0200 Subject: [PATCH] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1987d46..6f0884e 100644 --- a/README.md +++ b/README.md @@ -43,12 +43,12 @@ protected function getActions(): array { return [ SimpleMap::make('map') - ->address('Netherlands, Amsterdam, Mc Donalds'), + ->address(fn(Model $record) => $record->address)), ]; } ``` -You can add the `SimpleMap` component to any `TextEntry` field. +You can add the `SimpleMap` component to any `TextEntry` field action. ```php use CodeWithDennis\SimpleMap\Components\Infolists\SimpleMap; @@ -56,7 +56,7 @@ use CodeWithDennis\SimpleMap\Components\Infolists\SimpleMap; TextEntry::make('address') ->action( SimpleMap::make('map-2') - ->address('Netherlands, Amsterdam, Mc Donalds') + ->address(fn(Model $record) => $record->address)) ) ```