PHPackages                             koenhendriks/laravel-str-acronym - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. koenhendriks/laravel-str-acronym

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

koenhendriks/laravel-str-acronym
================================

A package to be able to generate acronyms from strings in Laravel projects using the Str helper and supports the Stringable class.

1.1.0(1y ago)4352.9k—3.8%6[3 PRs](https://github.com/koenhendriks/laravel-str-acronym/pulls)MITPHPCI passing

Since Mar 30Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/koenhendriks/laravel-str-acronym)[ Packagist](https://packagist.org/packages/koenhendriks/laravel-str-acronym)[ Docs](https://github.com/koenhendriks/laravel-str-acronym)[ RSS](/packages/koenhendriks-laravel-str-acronym/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (8)Used By (0)

[![social.png](social.png)](social.png)

Installation
------------

[](#installation)

You can install the package using Composer:

```
composer require koenhendriks/laravel-str-acronym

```

After installing the package Laravel should automatically discover the package.

If you want you can register the service provider in your Laravel application manually. You can do this by adding the service provider to the `providers` array in your `config/app.php` file:

```
'providers' => [
    KoenHendriks\StrAcronym\StrServiceProvider::class,
],
```

Once you've registered the service provider, you can start using the acronym macro in your Laravel application.

Usage
-----

[](#usage)

To generate an acronym from a string, you can call the acronym method on the Str helper:

```
use Illuminate\Support\Str;

$acronym = Str::acronym('Hello World'); // Returns 'HW'
```

If you prefer to use the Fluent Strings, you can call the acronym method on a Stringable object:

```
use Illuminate\Support\Str;

$acronym = Str::of('hello world')->headline()->acronym(); // Returns 'HW'
```

You can also provide a delimiter string as an optional parameter to separate the acronym letters:

```
use Illuminate\Support\Str;

$acronym = Str::acronym('Hello World', '.'); // Returns 'H.W.'
$acronym = Str::of('hello world')->headline()->acronym(); // Returns 'H.W.'
```

Testing
-------

[](#testing)

This package is using PhpUnit to unit test the macros. A simple alias has been created with composer to run the tests.

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

This package originates from [this Pull Request](https://github.com/laravel/framework/pull/46615) on the Laravel Framework

- [Koen Hendriks](https://github.com/koenhendriks)

### Contributors

[](#contributors)

- [Corné Dorrestijn](https://github.com/cornedor)
- [All Contributors](../../contributors)

License
-------

[](#license)

This package is licensed under the MIT License. See the LICENSE file for more information.

Contributing
------------

[](#contributing)

If you find any issues with the package or have suggestions for improvements, feel free to open an issue or pull request on the GitHub repository.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance65

Regular maintenance activity

Popularity43

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~194 days

Total

5

Last Release

367d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b05d18e316d563b67862000de15e18e2b3d11ec0fda133a19e66ce57a2a1569?d=identicon)[koenhendriks](/maintainers/koenhendriks)

---

Top Contributors

[![koenhendriks](https://avatars.githubusercontent.com/u/4124579?v=4)](https://github.com/koenhendriks "koenhendriks (22 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")[![imakedonski](https://avatars.githubusercontent.com/u/11677797?v=4)](https://github.com/imakedonski "imakedonski (3 commits)")[![Stoyan4o4](https://avatars.githubusercontent.com/u/14353153?v=4)](https://github.com/Stoyan4o4 "Stoyan4o4 (1 commits)")

---

Tags

laravelacronymkoenhendriksstr-acronymlaravel-str-acronym

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/koenhendriks-laravel-str-acronym/health.svg)

```
[![Health](https://phpackages.com/badges/koenhendriks-laravel-str-acronym/health.svg)](https://phpackages.com/packages/koenhendriks-laravel-str-acronym)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[xefi/faker-php-laravel

Faker php integration with laravel

1915.1k](/packages/xefi-faker-php-laravel)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
