2017 © Pedro Peláez
 

library laravel-uuid-model

Create non-incrementing Laravel models whose primary key is a UUID

image

stevenmaguire/laravel-uuid-model

Create non-incrementing Laravel models whose primary key is a UUID

  • Thursday, October 22, 2015
  • by stevenmaguire
  • Repository
  • 1 Watchers
  • 3 Stars
  • 38 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Laravel Uuid Model

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads, (*1)

Create non-incrementing models whose primary key is a UUID., (*2)

Install

Via Composer, (*3)

``` bash $ composer require stevenmaguire/laravel-uuid-model, (*4)


## Usage ### Extend the `UuidModel` ```php class User extends Stevenmaguire\Laravel\UuidModel { // }

By default any model that extends the UuidModel will automatically assign a random UUID value to the primaryKey while creating., (*5)

To include custom "UUID attributes", each model that extends the UuidModel can declare those attributes as an array value for the uuidAttributes property., (*6)

class User extends Stevenmaguire\Laravel\UuidModel
{
    /**
     * Auto-assigned uuid model attributes.
     *
     * @var array
     */
    public $uuidAttributes = ['foo', 'bar'];
}

This will result in the model's primary key, id, foo, and bar all being automatically assigned a random UUID value., (*7)

Testing

bash $ ./vendor/bin/phpunit, (*8)

Contributing

Please see CONTRIBUTING for details., (*9)

Security

If you discover any security related issues, please email stevenmaguire@gmail.com instead of using the issue tracker., (*10)

Credits

License

The MIT License (MIT). Please see License File for more information., (*11)

The Versions

22/10 2015

dev-master

9999999-dev https://github.com/stevenmaguire/laravel-uuid-model

Create non-incrementing Laravel models whose primary key is a UUID

  Sources   Download

MIT

The Requires

 

The Development Requires

orm laravel uuid guid eloquent model stevenmaguire

22/10 2015

0.1.0

0.1.0.0 https://github.com/stevenmaguire/laravel-uuid-model

Create non-incrementing Laravel models whose primary key is a UUID

  Sources   Download

MIT

The Requires

 

The Development Requires

orm laravel uuid guid eloquent model stevenmaguire