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>
3 replies