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 1mo ago

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 43% 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

2287d ago

Major Versions

1.2.4 → 2.0.02020-02-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/24ba455b2e4bbf5501fada39d878d9f173d6346377fedb8255d8267d42232c5f?d=identicon)[jvidalgz](/maintainers/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

[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)[vinkla/hashids

A Hashids bridge for Laravel

2.1k13.3M73](/packages/vinkla-hashids)[elfsundae/laravel-hashid

A simple, elegant way to obfuscate your data by generating reversible, non-sequential, URL-safe identifiers.

415246.3k2](/packages/elfsundae-laravel-hashid)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)

PHPackages © 2026

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