PHPackages                             pderas/shambles - 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. [Security](/categories/security)
4. /
5. pderas/shambles

ActiveLibrary[Security](/categories/security)

pderas/shambles
===============

A hashing library that will generate and add hashes to your laravel models.

v3.0.2(4y ago)036.0k↑25%1[1 issues](https://github.com/PDERAS/laravel-shambles/issues)MITPHPPHP &gt;=5.5.9

Since Feb 26Pushed 4y agoCompare

[ Source](https://github.com/PDERAS/laravel-shambles)[ Packagist](https://packagist.org/packages/pderas/shambles)[ Docs](https://github.com/PDERAS/laravel-shambles)[ RSS](/packages/pderas-shambles/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (3)Versions (10)Used By (0)

Shambles
========

[](#shambles)

```
composer require pderas/shambles

```

### Table Of Contents

[](#table-of-contents)

1. [About](#about)
2. [Installation](#installation)
3. [Requirements](#requirements)
4. [Instructions](#instructions)
5. [Usage](#usage)
6. [License](#license)

About
-----

[](#about)

This package is designed for Laravel that adds a hash value to a model into the database.

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

[](#installation)

#### Requirements

[](#requirements)

To use this package, the following requirements must be met:

- [Composer](https://getcomposer.org/)
- [Laravel](https://laravel.com/) (5.3+)

#### Instructions

[](#instructions)

Once you have succesfully required the package, (v5.3 only) you must register the service provider in your config/app.php file.

```
Pderas\Shambles\ShamblesServiceProvider::class,
```

Usage
-----

[](#usage)

If you would like a config file for shambles to define defaults for all models.

```
php artisan vendor:publish --provider="Pderas\Shambles\ShamblesServiceProvider"
```

### Back End

[](#back-end)

To use shambles you must make add a column 'hash' to the desired models in the database.

e.i. in a migration somewhere...

```
class MyMigration extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('my_table', function(Blueprint $table) {
            $table->string('hash')->unique();
        });
    }
}
```

Then all you have to do is add the Trait to the models

```
use Pderas\Shambles\Traits\ShamblesTrait;

class MyModel extends Model
{
    use ShamblesTrait;

    $defaultHashSize = 36;      // hash length can be set on a per model basis
    $defaultRouteKey = 'hash';  // route key can be set on a per model basis (laravel default is 'id', shambles default is 'hash')

    ...
}
```

Now whenever you create a new model it will auto add a hash to it. You can then use that hash for lookups and obscure the models auto-incrementing id.

Get Request ...

```
http://localhost/my-model-route/{HASH}

```

```
function myModelRouteFn(Request $request, MyModel $my_model)
{
    ...
    $my_model->update(...);
    ...
}
```

License
-------

[](#license)

This project is covered under the MIT License. Feel free to use it wherever you like.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 53.8% 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 ~107 days

Recently: every ~164 days

Total

9

Last Release

1778d ago

Major Versions

v1.1.0 → v2.0.02019-09-16

v2.1.0 → v3.0.02020-03-25

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11511864?v=4)[Reed Jones](/maintainers/reed-jones)[@reed-jones](https://github.com/reed-jones)

![](https://www.gravatar.com/avatar/550f3b6d3d4958eee851564e8f7e38545caf535f3f391af63878bf0196e58d37?d=identicon)[drewpderas](/maintainers/drewpderas)

---

Top Contributors

[![reed-jones](https://avatars.githubusercontent.com/u/11511864?v=4)](https://github.com/reed-jones "reed-jones (7 commits)")[![drewbindon](https://avatars.githubusercontent.com/u/35608232?v=4)](https://github.com/drewbindon "drewbindon (6 commits)")

---

Tags

laravelhashinghashshambles

### Embed Badge

![Health badge](/badges/pderas-shambles/health.svg)

```
[![Health](https://phpackages.com/badges/pderas-shambles/health.svg)](https://phpackages.com/packages/pderas-shambles)
```

###  Alternatives

[mikemclin/laravel-wp-password

Laravel package that checks and creates WordPress password hashes

863.4M2](/packages/mikemclin-laravel-wp-password)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

6392.1k](/packages/masterro-laravel-mail-viewer)[ammardev/laravel-wp-hash-driver

Supports Wordpress passwords hashing and checking in Laravel's Hash facade.

169.3k](/packages/ammardev-laravel-wp-hash-driver)[laragear/poke

Keep your forms alive, avoid TokenMismatchException by gently poking your Laravel app

2211.5k](/packages/laragear-poke)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)

PHPackages © 2026

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