mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
load map
This commit is contained in:
@@ -2,16 +2,33 @@
|
||||
|
||||
namespace App\Livewire\Nostr;
|
||||
|
||||
use App\Models\Meetup;
|
||||
use App\Models\User;
|
||||
use Livewire\Component;
|
||||
|
||||
class Start extends Component
|
||||
{
|
||||
public ?User $user = null;
|
||||
public array $geoJsons = [];
|
||||
|
||||
public function setUser($value)
|
||||
{
|
||||
$this->user = User::query()->with(['meetups'])->where('nostr', $value['npub'])->first();
|
||||
$this->user = User::query()
|
||||
->with([
|
||||
'meetups.city',
|
||||
])
|
||||
->where('nostr', $value['npub'])
|
||||
->first();
|
||||
|
||||
$this->geoJsons = Meetup::query()
|
||||
->with([
|
||||
'city',
|
||||
])
|
||||
->get()
|
||||
->pluck('city.simplified_geojson')
|
||||
->filter()
|
||||
->values()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
public function render()
|
||||
|
||||
Reference in New Issue
Block a user