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

AbandonedArchivedLibrary

nblackburn/laravel-hashids
==========================

A hashids wrapper for Laravel and Lumen.

1.2.4(10y ago)914.4k5[4 PRs](https://github.com/nblackburn/laravel-hashids/pulls)mitPHP

Since Jan 11Pushed 4y agoCompare

[ Source](https://github.com/nblackburn/laravel-hashids)[ Packagist](https://packagist.org/packages/nblackburn/laravel-hashids)[ RSS](/packages/nblackburn-laravel-hashids/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (3)Versions (6)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

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

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

Unknown

Total

1

Last Release

3775d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13700d6568fb06b7dbafb5214019c06f262679acdca72ec157f1479a0ac06bcd?d=identicon)[nblackburn](/maintainers/nblackburn)

---

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)")

---

Tags

hashidslaravellumenphp

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[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)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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