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)4263.4k↓63.6%6[3 PRs](https://github.com/koenhendriks/laravel-str-acronym/pulls)MITPHPCI passing

Since Mar 30Pushed 1w 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 2d ago

READMEChangelog (5)Dependencies (3)Versions (10)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

49

—

FairBetter than 94% of packages

Maintenance75

Regular maintenance activity

Popularity43

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity51

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

413d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4124579?v=4)[Koen Hendriks](/maintainers/koenhendriks)[@koenhendriks](https://github.com/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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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