2017 © Pedro Peláez
 

library eloquentuuid

Provides a unique Base62-encoded UUID representing a given state of a model instance

image

lucasmichot/eloquentuuid

Provides a unique Base62-encoded UUID representing a given state of a model instance

  • Monday, July 21, 2014
  • by lucasmichot
  • Repository
  • 2 Watchers
  • 2 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

EloquentUUID

Provides a unique Base62-encoded UUID representing a given state of a model instance., (*1)

This is particularly useful to keep track of model versions., (*2)

Why Base62 ?, (*3)

Compared to MD5, a Base62 hash is shorter and the alphabet used makes it cleaner to process, when used in a shorten URL for instance, or when stored in a database., (*4)

Requirements: * PHP >= 5.4 * Laravel 4.2, (*5)

Package installation

Begin by installing this package through Composer. Edit your project's composer.json file to require lucasmichot/eloquentuuid., (*6)

"require": {
  "lucasmichot/eloquentuuid": "0.*"
}

Next, update Composer from the Terminal:, (*7)

$ composer update

You can achieve these operations with this one-liner command :, (*8)

$ composer require "lucasmichot/eloquentuuid:0.*"

Usage

use Lucasmichot\Eloquentuuid\UuidTrait;

class Post extends Eloquent
{
    use UuidTrait;

    // the code of your model comes here
}

Accessing the UUID :, (*9)

$post = Post::find(1);
// update the attributes of the post

echo $post->uuid();

Each time the model is modified, the UUID is changed accordingly., (*10)

TODO

  • [ ] Finish documentation

The Versions

21/07 2014

dev-master

9999999-dev

Provides a unique Base62-encoded UUID representing a given state of a model instance

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

laravel uuid eloquent versioning

30/06 2014

0.1.2

0.1.2.0

Provides a unique Base62-encoded UUID representing a given state of a model instance

  Sources   Download

MIT

The Requires

 

laravel uuid eloquent versioning

30/06 2014

0.1.1

0.1.1.0

  Sources   Download

MIT

The Requires

 

30/06 2014

0.1

0.1.0.0

  Sources   Download

The Requires