Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Case Converter Laravel Package

jawira/case-converter

Convert strings between common case styles (camelCase, snake_case, kebab-case, PascalCase, etc.) with a simple PHP API. Handy for slugs, variable naming, and text normalization, supporting robust Unicode-aware conversions and formatting options.

View on GitHub
Deep Wiki
Context7

Known issues

Number is not a word

When using case-converter you cannot use a number as separator. In practice this means a number is always identified as a lower case letter.

Phing targets

As shown in the previous example, there is no way to go back to the original input string (i.e. hello-8-world), in _ kebab case_ this sting is written as hello8-world.

Other examples (with automatic case detection):

(new Convert('REEL2REAL'))->toDot(); // r.e.e.l2.r.e.a.l
(new Convert('reel2real'))->toDot(); // reel2real
(new Convert('Reel2Real'))->toDot(); // reel2.real

I strongly suggest to avoid numbers in strings to be converted.

Mixed conventions

It might be evident, but Case Converter cannot handle string with mixed naming conventions.

For example the string XMLHttpRequest will result in x.m.l.http.request when using dot notation:

$xhr = new Convert('XMLHttpRequest');
$xhr->toDot() // x.m.l.http.request

The correct way to name this string (for Case Converter) should have been XmlHttpRequest.

Another example of mixed conventions:

❌ Wrong ✅ Good
PHP_CodeSniffer php_code_sniffer
PHP_CodeSniffer PhpCodeSniffer
PHPUnit PhpUnit
PHPUnit php-unit
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests