2017 © Pedro Peláez
 

library laravel-fakeid

Automatic ID obfuscation for Eloquent models.

image

propaganistas/laravel-fakeid

Automatic ID obfuscation for Eloquent models.

  • Monday, July 23, 2018
  • by Propaganistas
  • Repository
  • 4 Watchers
  • 96 Stars
  • 26,896 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 6 Forks
  • 1 Open issues
  • 17 Versions
  • 6 % Grown

The README.md

🚨 ABANDONED

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

Use hashids instead., (*2)




Laravel FakeID

Tests Latest Stable Version Total Downloads License, (*3)

Enables automatic Eloquent model ID obfuscation in routes using Optimus., (*4)

Installation

  1. Run the Composer require command to install the package, (*5)

    composer require propaganistas/laravel-fakeid
    
  2. The package will automatically register itself., (*6)

  3. Run the following artisan command to auto-initialize the package's settings, (*7)

    php artisan fakeid:setup
    

Usage

Simply import the RoutesWithFakeIds trait into your model:, (*8)

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., (*9)

Example

Assuming an Article model having a named show route., (*10)

routes/web.php:, (*11)

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

app/Article.php, (*12)

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:, (*13)

<a href="{{ route('articles.show', $article) }}"> {{ $article->name }} </a>

The Versions

23/07 2018

dev-master

9999999-dev

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

23/07 2018

4.0.0

4.0.0.0

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

23/07 2018

dev-dev

dev-dev

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

14/02 2018

3.0.0

3.0.0.0

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

14/02 2018

dev-php7

dev-php7

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

24/08 2017

2.0.7

2.0.7.0

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

12/04 2017

2.0.6

2.0.6.0

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

12/04 2017

dev-tests

dev-tests

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

07/01 2017

2.0.5

2.0.5.0

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

03/01 2017

2.0.4

2.0.4.0

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

03/01 2017

2.0.3

2.0.3.0

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

07/11 2016

2.0.2

2.0.2.0

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

13/09 2016

2.0.1

2.0.1.0

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

03/08 2016

2.0.0

2.0.0.0

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

28/02 2016

1.0.2

1.0.2.0

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

23/08 2015

1.0.1

1.0.1.0

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid

20/08 2015

1.0.0

1.0.0.0

Automatic ID obfuscation for Eloquent models.

  Sources   Download

MIT

The Requires

 

by Avatar Propaganistas

laravel hashids optimus obfuscation fakeid