F
Filament2mo ago
Nobody

Infolist has no [record()] or [state()] set.

I tried to display maps or google maps using filament-google-maps from cheesegrits. but ran into a problem that Infolist has no [record()] or [state()] set. Here is the code <?php namespace App\Filament\Pages; use App\Models\Location; use Cheesegrits\FilamentGoogleMaps\Fields\Map; use Cheesegrits\FilamentGoogleMaps\Infolists\MapEntry; use Filament\Infolists\Infolist; use Filament\Pages\Page; class TaskDashboard extends Page { protected static ?string $navigationIcon = 'heroicon-o-document-text'; protected static string $view = 'filament.pages.task-dashboard'; public ?array $data = []; public function getTitle(): string { return ''; } public function infolist(Infolist $infolist): Infolist { return $infolist ->schema([ MapEntry::make('map') ->columnSpanFull() ->height('500px') ->defaultZoom(10) ->defaultLocation([39.526610, -107.727261]) // default for new forms ]); } } this is task-dashboard.blade.php {{-- @vite('resources/css/filament/app/theme.css') --}} @vite('resources/css/app.css') <x-filament-panels::page> <div class="w-full h-[500px]"> {{ $this->infolist }} </div> </x-filament-panels::page>
1 Reply
Nobody
Nobody2mo ago
This is the error Where is my mistake? or maybe there is another solution that is much better for displaying Map
No description
Want results from more Discord servers?
Add your server