diff --git a/app/Http/Controllers/FemaleNameController.php b/app/Http/Controllers/FemaleNameController.php index 81a4ac5..966364f 100644 --- a/app/Http/Controllers/FemaleNameController.php +++ b/app/Http/Controllers/FemaleNameController.php @@ -51,7 +51,7 @@ public function letter(Request $request): View $namesPagination = Cache::remember('female-letter-' . $requestedLetter . '-page-' . $requestedPage, 604800, fn () => Name::where('name', '!=', '_PRENOMS_RARES') ->where('gender', 'female') - ->where('name', 'like', $requestedLetter . '%') + ->where('name', 'like', Str::upper($requestedLetter) . '%') ->orderBy('total', 'desc') ->paginate(40) ); @@ -67,7 +67,7 @@ public function letter(Request $request): View 'letters' => $letters, 'names' => $names, 'namesPagination' => $namesPagination, - 'activeLetter' => Str::ucfirst($requestedLetter), + 'activeLetter' => Str::upper($requestedLetter), 'favorites' => $favoritedNamesForLoggedUser, ]); } diff --git a/app/Http/Controllers/MaleNameController.php b/app/Http/Controllers/MaleNameController.php index 83bbb8f..63e0664 100644 --- a/app/Http/Controllers/MaleNameController.php +++ b/app/Http/Controllers/MaleNameController.php @@ -51,7 +51,7 @@ public function letter(Request $request): View $namesPagination = Cache::remember('male-letter-' . $requestedLetter . '-page-' . $requestedPage, 604800, fn () => Name::where('name', '!=', '_PRENOMS_RARES') ->where('gender', 'male') - ->where('name', 'like', $requestedLetter . '%') + ->where('name', 'like', Str::upper($requestedLetter) . '%') ->orderBy('total', 'desc') ->paginate(40) ); @@ -67,7 +67,7 @@ public function letter(Request $request): View 'letters' => $letters, 'names' => $names, 'namesPagination' => $namesPagination, - 'activeLetter' => Str::ucfirst($requestedLetter), + 'activeLetter' => Str::upper($requestedLetter), 'favorites' => $favoritedNamesForLoggedUser, ]); } diff --git a/app/Http/Controllers/MixteNameController.php b/app/Http/Controllers/MixteNameController.php index abe2753..192830d 100644 --- a/app/Http/Controllers/MixteNameController.php +++ b/app/Http/Controllers/MixteNameController.php @@ -51,7 +51,7 @@ public function letter(Request $request): View $namesPagination = Cache::remember('mixte-letter-' . $requestedLetter . '-page-' . $requestedPage, 604800, fn () => Name::where('name', '!=', '_PRENOMS_RARES') ->where('unisex', 1) - ->where('name', 'like', $requestedLetter . '%') + ->where('name', 'like', Str::upper($requestedLetter) . '%') ->orderBy('total', 'desc') ->paginate(40) ); @@ -67,7 +67,7 @@ public function letter(Request $request): View 'letters' => $letters, 'names' => $names, 'namesPagination' => $namesPagination, - 'activeLetter' => Str::ucfirst($requestedLetter), + 'activeLetter' => Str::upper($requestedLetter), 'favorites' => $favoritedNamesForLoggedUser, ]); }