From 08dc492061d029e2e9680543d0888e18b5dffb5b Mon Sep 17 00:00:00 2001 From: Paulo Henrique Garcia Date: Fri, 6 Jan 2023 21:57:04 +0100 Subject: [PATCH] Reintroduce $evenFirstOne logic --- src/MigBuilder/Util.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/MigBuilder/Util.php b/src/MigBuilder/Util.php index 4f0b9d4..3141bcb 100644 --- a/src/MigBuilder/Util.php +++ b/src/MigBuilder/Util.php @@ -8,7 +8,13 @@ class Util { public static function firstUpper($name, $evenFirstOne = true){ $name = (stripos($name, '_') === false) ? Str::snake($name) : $name; + + $processedName = Str::of($name)->camel(); + + if ($evenFirstOne === false) { + return $processedName; + } - return ucfirst(Str::of($name)->camel()); + return ucfirst($processedName); } }