image processor added

This commit is contained in:
HolgerHatGarKeineNode
2023-02-15 11:25:31 +01:00
parent 5b1d0886dc
commit 2949ff5cb0
22 changed files with 278 additions and 177 deletions

View File

@@ -53,32 +53,35 @@ Route::middleware([])
Route::get('btc-map-communities', function () {
return response()->json(\App\Models\Meetup::query()
->with([
'media',
'city.country',
])
->where('community', '=', 'einundzwanzig')
->whereHas('city',
fn($query) => $query
->whereNotNull('cities.simplified_geojson')
->whereNotNull('cities.population')
->whereNotNull('cities.population_date')
)
->when(app()->environment('production'),
fn($query) => $query->whereHas('city',
fn($query) => $query
->whereNotNull('cities.simplified_geojson')
->whereNotNull('cities.population')
->whereNotNull('cities.population_date')
))
->get()
->map(fn($meetup) => [
'id' => $meetup->slug,
'tags' => [
'type' => 'community',
'name' => $meetup->name,
'continent' => 'europe',
'icon:square' => $meetup->getFirstMediaUrl('logo'),
'contact:email' => null,
'contact:twitter' => 'https://twitter.com/'.$meetup->twitter_username,
'contact:website' => $meetup->webpage,
'tips:lightning_address' => null,
'organization' => 'einundzwanzig',
'language' => $meetup->city->country->language_codes[0],
'geo_json' => $meetup->city->simplified_geojson,
'population' => $meetup->city->population,
'population:date' => $meetup->city->population_date,
'type' => 'community',
'name' => $meetup->name,
'continent' => 'europe',
'icon:square' => $meetup->logoSquare,
//'contact:email' => null,
'contact:twitter' => 'https://twitter.com/'.$meetup->twitter_username,
'contact:website' => $meetup->webpage,
'contact:nostr' => $meetup->nostr,
//'tips:lightning_address' => null,
'organization' => 'einundzwanzig',
'language' => $meetup->city->country->language_codes[0] ?? 'de',
'geo_json' => $meetup->city->simplified_geojson,
'population' => $meetup->city->population,
'population:date' => $meetup->city->population_date,
],
])
->toArray(), 200,