Skip to content
Snippets Groups Projects
Verified Commit 9febb932 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

fix: update mapping for visits by country in HomeController

Updated the mapping in the `HomeController` to use 'country_code' instead of 'country' for better clarity in the visits data structure.
parent 10020993
Branches
No related tags found
No related merge requests found
Pipeline #1018 passed
......@@ -44,7 +44,7 @@ public function index(): View
->values();
$visitsByCountry = $visits->groupBy('country_code')
->map(fn ($group, $country) => ['country' => $country, 'count' => $group->count()])
->map(fn ($group, $country) => ['country_code' => $country, 'count' => $group->count()])
->values();
$mostVisitedPages = $visits->groupBy('url')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment