PHPackages                             alihann/laravel-rockid - 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. alihann/laravel-rockid

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

alihann/laravel-rockid
======================

Laravel package for id obfuscation using jenssegers/optimus.

v1.0(10y ago)120MITPHP ^5.5.9 || ^7.0

Since Jun 1Compare

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

READMEChangelogDependencies (4)Versions (3)Used By (0)

Laravel Rockid
==============

[](#laravel-rockid)

Id obfuscation for Laravel using [Optimus](https://github.com/jenssegers/optimus).

### How to Install

[](#how-to-install)

1. composer require

    ```
    composer require alihann/laravel-rockid
    ```
2. in your config/app.php

    ```
    'providers' => [
            App\Providers\EventServiceProvider::class,
            App\Providers\RouteServiceProvider::class,
            ...
            Alihann\LaravelRockid\RockidServiceProvider::class,
        ],
    ```
3. and if you want to use facade

    ```
    'aliases' => [
            'Validator' => Illuminate\Support\Facades\Validator::class,
            'View' => Illuminate\Support\Facades\View::class,
            ...
            'Rockid' => Alihann\LaravelRockid\Facades\Rockid::class,
        ],
    ```
4. publish the config file

    ```
    php artisan vendor:publish
    ```
5. generate numbers and add to the published config file. (i.e. config/rockid.php)

    ```
    php artisan rockid:generate
    ```

### Usage

[](#usage)

you can use ObfuscatesId trait to get the obfuscated id of the model in your views.

```
use Illuminate\Database\Eloquent\Model;
use Alihann\LaravalRockId\ObfuscatesId;

class User extends Model {

  use ObfuscatesId;

}
```

now you have getId method in your model to generate an obfuscated id.

```
Show user

```

routes.php

```
Route::bind('user', function ($value) {
    $id = Rockid::decode($value);
    return \App\User::find($id);
});

Route::get('user/{user}', function ($user) {
    return $user->getId();
});
```

or in RouteServiceProvider class

```
public function boot(Router $router)
{
    parent::boot($router);

    $router->bind('user', function ($value) {
        $id = app('rockid')->decode($value);
        return \App\User::find($id);
    });
}
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

3681d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19667732?v=4)[alihann](/maintainers/alihann)[@alihann](https://github.com/alihann)

---

Top Contributors

[![alihann](https://avatars.githubusercontent.com/u/19667732?v=4)](https://github.com/alihann "alihann (4 commits)")

---

Tags

laravelencryptdecryptidsobfuscateoptimusrockid

### Embed Badge

![Health badge](/badges/alihann-laravel-rockid/health.svg)

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

###  Alternatives

[cybercog/laravel-optimus

An Optimus bridge for Laravel. Id obfuscation based on Knuth's multiplicative hashing method.

193573.4k](/packages/cybercog-laravel-optimus)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k89.4M576](/packages/laravel-passport)[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M165](/packages/laravel-ai)[elfsundae/laravel-hashid

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

412255.7k2](/packages/elfsundae-laravel-hashid)[zidbih/laravel-deadlock

Make temporary Laravel workarounds expire and fail CI when ignored.

984.0k](/packages/zidbih-laravel-deadlock)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

19253.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

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