JSON_UNESCAPED_SLASHES

This commit is contained in:
HolgerHatGarKeineNode
2023-02-08 16:36:58 +01:00
parent e7dca50d95
commit 45140f84a1

View File

@@ -50,17 +50,17 @@ Route::middleware([])
]); ]);
}); });
Route::get('btc-map-communities', function () { Route::get('btc-map-communities', function () {
return \App\Models\Meetup::query() return response()->json(\App\Models\Meetup::query()
->with([ ->with([
'city.country', 'city.country',
]) ])
->where('community', '=', 'einundzwanzig') // ->where('community', '=', 'einundzwanzig')
->whereHas('city', // ->whereHas('city',
fn($query) => $query // fn($query) => $query
->whereNotNull('cities.simplified_geojson') // ->whereNotNull('cities.simplified_geojson')
->whereNotNull('cities.population') // ->whereNotNull('cities.population')
->whereNotNull('cities.population_date') // ->whereNotNull('cities.population_date')
) // )
->get() ->get()
->map(fn($meetup) => [ ->map(fn($meetup) => [
'id' => $meetup->slug, 'id' => $meetup->slug,
@@ -79,7 +79,9 @@ Route::middleware([])
'population' => $meetup->city->population, 'population' => $meetup->city->population,
'population:date' => $meetup->city->population_date, 'population:date' => $meetup->city->population_date,
], ],
]); ])
->toArray(), 200,
['Content-Type' => 'application/json;charset=UTF-8', 'Charset' => 'utf-8'], JSON_UNESCAPED_SLASHES);
}); });
}); });