From b49b3e549031cfe75578824fa4f280843de12a7c Mon Sep 17 00:00:00 2001 From: ScuffedNewt Date: Wed, 28 Aug 2024 01:45:07 +0100 Subject: [PATCH] fix(tags): fix tag mappings --- app/Http/Controllers/Admin/Characters/CharacterController.php | 2 +- app/Http/Controllers/BrowseController.php | 2 +- resources/views/character/_image_info.blade.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Admin/Characters/CharacterController.php b/app/Http/Controllers/Admin/Characters/CharacterController.php index 0fb0f9766..4c8856b5d 100644 --- a/app/Http/Controllers/Admin/Characters/CharacterController.php +++ b/app/Http/Controllers/Admin/Characters/CharacterController.php @@ -50,7 +50,7 @@ public function getCreateCharacter() { $contentWarnings = CharacterImage::whereNotNull('content_warnings')->pluck('content_warnings')->flatten()->map(function($warnings) { return collect($warnings)->mapWithKeys(function($warning) { $lower = strtolower(trim($warning)); - return ['tag' => ucfirst($lower)]; + return [$lower => ucwords($lower)]; }); })->collapse()->unique()->sort()->toArray(); diff --git a/app/Http/Controllers/BrowseController.php b/app/Http/Controllers/BrowseController.php index 9099331e7..c0a617ac9 100644 --- a/app/Http/Controllers/BrowseController.php +++ b/app/Http/Controllers/BrowseController.php @@ -364,7 +364,7 @@ public function getCharacters(Request $request) { $contentWarnings = CharacterImage::whereNotNull('content_warnings')->pluck('content_warnings')->flatten()->map(function($warnings) { return collect($warnings)->mapWithKeys(function($warning) { $lower = strtolower(trim($warning)); - return [$lower => ucfirst($lower)]; + return [$lower => ucwords($lower)]; }); })->collapse()->unique()->sort()->toArray(); diff --git a/resources/views/character/_image_info.blade.php b/resources/views/character/_image_info.blade.php index e0878057f..f0574f975 100644 --- a/resources/views/character/_image_info.blade.php +++ b/resources/views/character/_image_info.blade.php @@ -224,7 +224,7 @@ ->map(function ($warnings) { return collect($warnings)->mapWithKeys(function ($warning) { $lower = strtolower(trim($warning)); - return [$lower => ucfirst($lower)]; + return [$lower => ucwords($lower)]; }); }) ->collapse()