PHPackages                             code-distortion/laravel-helpers - 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. code-distortion/laravel-helpers

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

code-distortion/laravel-helpers
===============================

Various helpers and tools for Laravel

0.1.4(3y ago)0552MITPHPPHP 8.0.\* | 8.1.\* | 8.2.\*

Since Sep 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/code-distortion/laravel-helpers)[ Packagist](https://packagist.org/packages/code-distortion/laravel-helpers)[ Docs](https://github.com/code-distortion/laravel-helpers)[ RSS](/packages/code-distortion-laravel-helpers/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (5)Dependencies (6)Versions (6)Used By (0)

Laravel Helpers
===============

[](#laravel-helpers)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6c48066a4a9ac491d607bcf2d189dfaa4fbea38b56a1152372f82e7bd8ee600b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f64652d646973746f7274696f6e2f6c61726176656c2d68656c706572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/code-distortion/laravel-helpers)[![PHP Version](https://camo.githubusercontent.com/48138e82228e0725dd9946db0437c01909767ec16f618588b71d4602dde1b948/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e30253230746f253230382e322d626c75653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/48138e82228e0725dd9946db0437c01909767ec16f618588b71d4602dde1b948/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e30253230746f253230382e322d626c75653f7374796c653d666c61742d737175617265)[![Laravel](https://camo.githubusercontent.com/d7bba02b4110b412ea6856b875345d596a12bac0d6b4bd1dd4b084ea4239b839/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d37253243253230382532432532303925323025323625323031302d626c75653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/d7bba02b4110b412ea6856b875345d596a12bac0d6b4bd1dd4b084ea4239b839/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d37253243253230382532432532303925323025323625323031302d626c75653f7374796c653d666c61742d737175617265)[![GitHub Workflow Status](https://camo.githubusercontent.com/b2261155744df38025f266b279993d3a2556eca075a08da15a341c1b98d45a7f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636f64652d646973746f7274696f6e2f6c61726176656c2d68656c706572732f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://github.com/code-distortion/laravel-helpers/actions)

Warning
-------

[](#warning)

This package was developed for use in my own projects. It might not suit your needs or be documented properly, and may change at any time.

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

[](#installation)

Install the package via composer:

```
composer require code-distortion/laravel-helpers
```

The package will automatically register itself.

String Macros
-------------

[](#string-macros)

These macros are applied to `Illuminate\Support\Str` and `Illuminate\Support\Stringable`:

- [`unspace`](#unspace)

### `unspace`

[](#unspace)

Trim and remove repeated-spaces from a string:

```
// ' a  b  c ' >> 'a b c'
Str::unspace($string);
Str::of($string)->unspace();
```

> By default, all *whitespace* characters are searched for and replaced with spaces.

You can specify which character/s to search for:

```
// '_a__b__c_' >> 'a_b_c'
Str::unspace($string, '_');
Str::of($string)->unspace('_');
```

> Searching for an empty string will search for all *whitespace* characters.

And you can specify a replacement:

```
// ' a  b  c ' >> 'a-b-c'
Str::unspace($string, ' ', '-');
Str::of($string)->unspace(' ', '-');
```

> If no replacement is specified, the character being searched for will be used.
>
> If more than one character is being searched for, a space is used as the replacement.

Changelog
---------

[](#changelog)

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

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Contributions are not being sought for this package.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Tim Chandler](https://github.com/code-distortion)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~164 days

Total

5

Last Release

1095d ago

PHP version history (3 changes)0.1.0PHP ^8.0

0.1.1PHP 8.0.\* | 8.1.\*

0.1.3PHP 8.0.\* | 8.1.\* | 8.2.\*

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/56794290?v=4)[Tim](/maintainers/code-distortion)[@code-distortion](https://github.com/code-distortion)

---

Top Contributors

[![code-distortion](https://avatars.githubusercontent.com/u/56794290?v=4)](https://github.com/code-distortion "code-distortion (19 commits)")

---

Tags

laravel-helpersstringablemacros

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/code-distortion-laravel-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/code-distortion-laravel-helpers/health.svg)](https://phpackages.com/packages/code-distortion-laravel-helpers)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

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

Laravel Page Speed

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

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M279](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M371](/packages/illuminate-redis)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

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