PHPackages                             leuverink/eloquent-hashid-binding - 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. [Database &amp; ORM](/categories/database)
4. /
5. leuverink/eloquent-hashid-binding

ActiveLibrary[Database &amp; ORM](/categories/database)

leuverink/eloquent-hashid-binding
=================================

A drop in solution for eloquent route model binding with hashid's

1.5.0(1y ago)15.3kMITPHPCI failing

Since Jul 8Pushed 1y agoCompare

[ Source](https://github.com/gwleuverink/eloquent-hashid-binding)[ Packagist](https://packagist.org/packages/leuverink/eloquent-hashid-binding)[ RSS](/packages/leuverink-eloquent-hashid-binding/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (9)Dependencies (5)Versions (13)Used By (0)

 [![](docs/assets/package-logo.png)](docs/assets/package-logo.png)

 [![Build Status](https://camo.githubusercontent.com/2d7fd8263cf2e393e1e09a77b1b8dfb55f1f828c88ecc53d00f99ec564730774/68747470733a2f2f7472617669732d63692e6f72672f67776c6575766572696e6b2f656c6f7175656e742d6861736869642d62696e64696e672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/gwleuverink/eloquent-hashid-binding) [![Coverage Status](https://camo.githubusercontent.com/45821f03d9f6119221d631f52d55a30b2ee328f14ee95f51ff373bdf00669663/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f67776c6575766572696e6b2f656c6f7175656e742d6861736869642d62696e64696e672f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/gwleuverink/eloquent-hashid-binding?branch=master) [![Latest Stable Version](https://camo.githubusercontent.com/b6a6a3a643291f66bf1a3d501380986905b5d5ea3d6a30ece1be6fc22da06a2e/68747470733a2f2f706f7365722e707567782e6f72672f6c6575766572696e6b2f656c6f7175656e742d6861736869642d62696e64696e672f762f737461626c652e737667)](https://packagist.org/packages/leuverink/eloquent-hashid-binding) [![Latest Unstable Version](https://camo.githubusercontent.com/ae26cd86a4a822edf08d30413a740a738c3a89afe6dd3a552d611081ea535aaf/68747470733a2f2f706f7365722e707567782e6f72672f6c6575766572696e6b2f656c6f7175656e742d6861736869642d62696e64696e672f762f756e737461626c652e737667)](https://packagist.org/packages/leuverink/eloquent-hashid-binding) [![License](https://camo.githubusercontent.com/19ca7bce9c0fefde628192af8aea47a8afae70cb3d6348023aaf1139f1e52f02/68747470733a2f2f706f7365722e707567782e6f72672f6c6575766572696e6b2f656c6f7175656e742d6861736869642d62696e64696e672f6c6963656e73652e737667)](https://packagist.org/packages/leuverink/eloquent-hashid-binding)

 A drop in solution for eloquent implicit route model binding with hashid's.
 Obfuscate your app's id's from prying eyes.

---

***What this package does***

This package obfuscates eloquent model's id's when used in url's. This is really usefull when you don't want to expose id's to the outside world.

The route keys are encoded/decoded on the fly. You can drop this in any Laravel project without the need for migrations.

**EXAMPLE**Before`domain.test/users/1`After`domain.test/users/rvBVv`---

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

[](#installation)

`composer require leuverink/eloquent-hashid-binding`

Basic usage
-----------

[](#basic-usage)

Simply use the HashidBinding trait in your eloquent model and you're good to go!

```
namespace App;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Leuverink\HashidBinding\HashidBinding;

class User extends Authenticatable
{
    use HashidBinding;

    //
}
```

That's it! Check out [the docs](https://gwleuverink.github.io/eloquent-hashid-binding/) for more information.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 95.1% 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 ~252 days

Recently: every ~424 days

Total

9

Last Release

534d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9531bf1fdbe178d3a5129b81e61b70be81359ebf10ce3f282705a8275b4bd31d?d=identicon)[gwleuverink](/maintainers/gwleuverink)

---

Top Contributors

[![gwleuverink](https://avatars.githubusercontent.com/u/17123491?v=4)](https://github.com/gwleuverink "gwleuverink (39 commits)")[![Kussie](https://avatars.githubusercontent.com/u/4960791?v=4)](https://github.com/Kussie "Kussie (2 commits)")

---

Tags

composerhashidslaravelroute-model-binding

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/leuverink-eloquent-hashid-binding/health.svg)

```
[![Health](https://phpackages.com/badges/leuverink-eloquent-hashid-binding/health.svg)](https://phpackages.com/packages/leuverink-eloquent-hashid-binding)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k54.9M11.7k](/packages/illuminate-database)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[kirkbushell/eloquence

A set of extensions adding additional functionality and consistency to Laravel's awesome Eloquent library.

5751.0M1](/packages/kirkbushell-eloquence)[lemaur/eloquent-publishing

218.1k1](/packages/lemaur-eloquent-publishing)

PHPackages © 2026

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