PHPackages                             propaganistas/laravel-fakeid - 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. propaganistas/laravel-fakeid

Abandoned → [vinkla/hashids](/?search=vinkla%2Fhashids)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

propaganistas/laravel-fakeid
============================

Automatic ID obfuscation for Eloquent models.

4.2.3(2y ago)198230.1k↓11.5%172MITPHPPHP ^8.0

Since Aug 19Pushed 2y ago5 watchersCompare

[ Source](https://github.com/Propaganistas/Laravel-FakeId)[ Packagist](https://packagist.org/packages/propaganistas/laravel-fakeid)[ GitHub Sponsors](https://github.com/Propaganistas)[ RSS](/packages/propaganistas-laravel-fakeid/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (31)Used By (2)

🚨 ABANDONED
===========

[](#-abandoned)

Looking for a new maintainer. If no maintainer is found by December 2025, this repository will be deleted.

Use [hashids](https://github.com/vinkla/hashids) instead.

---

---

---

Laravel FakeID
==============

[](#laravel-fakeid)

[![Tests](https://github.com/Propaganistas/Laravel-FakeId/workflows/Tests/badge.svg?branch=master)](https://github.com/Propaganistas/Laravel-FakeId/workflows/Tests/badge.svg?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/b50a8e7cda5e0a07c077b3384f49fc900fa4ba3d234acdc62f031b9b94dd4402/68747470733a2f2f706f7365722e707567782e6f72672f70726f706167616e69737461732f6c61726176656c2d66616b6569642f762f737461626c65)](https://packagist.org/packages/propaganistas/laravel-fakeid)[![Total Downloads](https://camo.githubusercontent.com/4fa027189e4742599cd63bb04ed11eb96ea91567c467a3f181d526acdeb211cb/68747470733a2f2f706f7365722e707567782e6f72672f70726f706167616e69737461732f6c61726176656c2d66616b6569642f646f776e6c6f616473)](https://packagist.org/packages/propaganistas/laravel-fakeid)[![License](https://camo.githubusercontent.com/fef67873ef49cd284f3bdbd47dc9ef6f76ad225f336668ceb05b295a9e9e9596/68747470733a2f2f706f7365722e707567782e6f72672f70726f706167616e69737461732f6c61726176656c2d66616b6569642f6c6963656e7365)](https://packagist.org/packages/propaganistas/laravel-fakeid)

Enables automatic Eloquent model ID obfuscation in routes using [Optimus](https://github.com/jenssegers/optimus).

### Installation

[](#installation)

1. Run the Composer require command to install the package

    ```
    composer require propaganistas/laravel-fakeid
    ```
2. The package will automatically register itself.
3. Run the following artisan command to auto-initialize the package's settings

    ```
    php artisan fakeid:setup
    ```

### Usage

[](#usage)

Simply import the `RoutesWithFakeIds` trait into your model:

```
use Illuminate\Database\Eloquent\Model;
use Propaganistas\LaravelFakeId\RoutesWithFakeIds;

class MyModel extends Model
{
    use RoutesWithFakeIds;
}
```

All routes generated for this particular model will expose a **fake** ID instead of the raw primary key. Moreover incoming requests containing those fake IDs are automatically converted back to a real ID. The obfuscation layer is therefore transparent and doesn't require you to rethink everything. Just use Laravel as you normally would.

### Example

[](#example)

Assuming an `Article` model having a named `show` route.

`routes/web.php`:

```
Route::get('articles/{article}', 'ArticleController@show')->name('articles.show');
```

`app/Article.php`

```
use Illuminate\Database\Eloquent\Model;
use Propaganistas\LaravelFakeId\RoutesWithFakeIds;

class Article extends Model
{
    use RoutesWithFakeIds;
}
```

A route to this specific endpoint can now be generated using Laravel's `route()` helper, and it will automatically contain a **fake** ID:

```
 {{ $article->name }}
```

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity50

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 88.3% 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 ~111 days

Recently: every ~100 days

Total

29

Last Release

797d ago

Major Versions

1.0.2 → 2.0.02016-08-03

2.0.7 → 3.0.02018-02-14

3.0.0 → 4.0.02018-07-23

PHP version history (6 changes)1.0.0PHP &gt;=5.4.0

3.0.0PHP &gt;=7.0

4.0.2PHP &gt;=7.1

4.0.8PHP &gt;=7.1|^8.0

4.0.9PHP ^7.1|^8.0

4.1.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5bd56e80207565b915bd290ef86db6ee0369a49282255513dafbc59f5e1403e7?d=identicon)[Propaganistas](/maintainers/Propaganistas)

---

Top Contributors

[![Propaganistas](https://avatars.githubusercontent.com/u/6680176?v=4)](https://github.com/Propaganistas "Propaganistas (83 commits)")[![mbardelmeijer](https://avatars.githubusercontent.com/u/1583095?v=4)](https://github.com/mbardelmeijer "mbardelmeijer (2 commits)")[![tarekadam](https://avatars.githubusercontent.com/u/1118276?v=4)](https://github.com/tarekadam "tarekadam (2 commits)")[![javaftper](https://avatars.githubusercontent.com/u/13317379?v=4)](https://github.com/javaftper "javaftper (1 commits)")[![benswinburne](https://avatars.githubusercontent.com/u/1208977?v=4)](https://github.com/benswinburne "benswinburne (1 commits)")[![salkhwlani](https://avatars.githubusercontent.com/u/10876587?v=4)](https://github.com/salkhwlani "salkhwlani (1 commits)")[![sebastiaanluca](https://avatars.githubusercontent.com/u/711940?v=4)](https://github.com/sebastiaanluca "sebastiaanluca (1 commits)")[![mtmail](https://avatars.githubusercontent.com/u/3727288?v=4)](https://github.com/mtmail "mtmail (1 commits)")[![irazasyed](https://avatars.githubusercontent.com/u/1915268?v=4)](https://github.com/irazasyed "irazasyed (1 commits)")[![ivanvermeyen](https://avatars.githubusercontent.com/u/3598622?v=4)](https://github.com/ivanvermeyen "ivanvermeyen (1 commits)")

---

Tags

fakeidhashidslaravelobfuscationoptimuslaravelhashidsobfuscationoptimusfakeid

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/propaganistas-laravel-fakeid/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[watson/active

Laravel helper for recognising the current route, controller and action

3253.6M14](/packages/watson-active)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[jenssegers/optimus

Id obfuscation based on Knuth's integer hash method

1.3k4.8M27](/packages/jenssegers-optimus)[anahkiasen/former

A powerful form builder

1.4k1.4M14](/packages/anahkiasen-former)[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)

PHPackages © 2026

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