PHPackages                             jvidalgz/laravel-hashids - 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. jvidalgz/laravel-hashids

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

jvidalgz/laravel-hashids
========================

A hashids wrapper for Laravel and Lumen.

2.0.0(6y ago)03MIT

Since Jan 11Pushed 6y agoCompare

[ Source](https://github.com/jvidalgz/laravel-hashids)[ Packagist](https://packagist.org/packages/jvidalgz/laravel-hashids)[ RSS](/packages/jvidalgz-laravel-hashids/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Hashids
=======

[](#hashids)

A hashids wrapper for Laravel &amp; Lumen.

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

[](#installation)

### Laravel

[](#laravel)

Inside `config/app.php` add the following line in your providers

```
LaravelHashids\Providers\LaravelServiceProvider::class
```

and then simply run the following artisan command...

```
php artisan config:publish nblackburn/laravel-hashids
```

#### Facade

[](#facade)

To add facade support for Laravel, add the following line inside your `config/app.php` under the alias section...

```
'Parsedown' => LaravelParsedown\Facades\Parsedown::class,
```

### Lumen

[](#lumen)

Inside `bootstrap/app.php`, add the following line:

```
$app->register(LaravelHashids\Providers\LumenServiceProvider::class);
```

then add the following to your `.env` file:

```
# HASHIDS

HASHIDS_SALT = YOURSECRETKEY
HASHIDS_LENGTH = 8
HASHIDS_ALPHABET = abcedfghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPAQRSTUVWXYZ1234567890
```

#### Facade

[](#facade-1)

To add facade support, firstly uncomment the following line within `bootstrap/app.php`:

```
// $app->withFacades();
```

then register the facade like so...

```
$app->register(LaravelHashids\Facades\Hashids::class);
```

Settings
--------

[](#settings)

namedescriptiondefaultsaltThe secret used for hashing.MYREALLYSECRETSALTlengthThe maximum length of the hash.10alphabetThe characters used for hashing.abcedefghijklmnopqrstuvwxyzABCEDEFGHIJKLMNOPQRSTUVWXYZ123456890Usage
-----

[](#usage)

### Encode

[](#encode)

Encode a series of integers

```
app('hashids')->encode(...$integers);
```

or with the facade

```
Hashids::encode(...$integers);
```

### Decode

[](#decode)

Decode a encoded string back to the original integers

```
app('hashids')->decode($encoded);
```

or with the facade

```
Hashids::decode($encoded);
```

License
-------

[](#license)

This library is licensed under [MIT](http://choosealicense.org/licenses/mit), see [license.md](license.md) for details.

Donations
---------

[](#donations)

[![](https://camo.githubusercontent.com/e9aa2120403febc22384c319070cfa5c36d1849fa75fdb74c1dfe83a8c136ef2/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f626c61636b5f696d672e706e67)](https://buymeacoffee.com/nblackburn)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 84% 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 ~1487 days

Total

2

Last Release

2340d ago

Major Versions

1.2.4 → 2.0.02020-02-06

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5294131?v=4)[Jaime Vidal González](/maintainers/jvidalgz)[@jvidalgz](https://github.com/jvidalgz)

---

Top Contributors

[![nblackburn](https://avatars.githubusercontent.com/u/2931085?v=4)](https://github.com/nblackburn "nblackburn (63 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (8 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jvidalgz-laravel-hashids/health.svg)

```
[![Health](https://phpackages.com/badges/jvidalgz-laravel-hashids/health.svg)](https://phpackages.com/packages/jvidalgz-laravel-hashids)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[illuminate/pagination

The Illuminate Pagination package.

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

The Illuminate Pipeline package.

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

The Illuminate Redis package.

8314.6M376](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.6M137](/packages/illuminate-cookie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k19](/packages/solspace-craft-freeform)

PHPackages © 2026

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