heatmap added

This commit is contained in:
HolgerHatGarKeineNode
2023-02-08 00:52:43 +01:00
parent eabf42b67b
commit 6e8c722a0f
21 changed files with 1847 additions and 25 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Http\Livewire\BookCase;
use App\Models\BookCase;
use Livewire\Component;
class Heatmap extends Component
{
public string $country;
public function render()
{
$data = BookCase::query()
->whereHas('orangePills')
->get()->map(fn($bookCase) => [
'lat' => $bookCase->latitude,
'lng' => $bookCase->longitude,
]);
return view('livewire.book-case.heatmap', [
'heatmap_data' => $data,
]);
}
}