2017 © Pedro Peláez
 

library eloquent-uuid

Uuid primary key for Laravel Eloquent Models

image

marquine/eloquent-uuid

Uuid primary key for Laravel Eloquent Models

  • Wednesday, December 27, 2017
  • by leomarquine
  • Repository
  • 1 Watchers
  • 6 Stars
  • 1,043 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 56 % Grown

The README.md

Eloquent UUID

Uuid primary key for Laravel Eloquent Models., (*1)

Installation

Install through Composer, (*2)

composer require marquine/eloquent-uuid

Usage

Database table

In your migration, create a column for the uuid primary key:, (*3)

$table->uuid('id')->primary();

or, (*4)

$table->string('id', 32)->primary();

If your primary key column name is not id, you need to set the model's $primaryKey property to the correct name., (*5)

Model

Use the Uuid trait in your model:, (*6)

<?php

namespace App;

use Marquine\EloquentUuid\Uuid;
use Illuminate\Database\Eloquent\Model;

class User extends Model
{
    use Uuid;
}

License

Eloquent UUID is licensed under the MIT license., (*7)

The Versions

27/12 2017

dev-master

9999999-dev

Uuid primary key for Laravel Eloquent Models

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leonardo Marquine

laravel uuid eloquent

27/12 2017

v1.0.2

1.0.2.0

Uuid primary key for Laravel Eloquent Models

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leonardo Marquine

laravel uuid eloquent

05/06 2017

v1.0.1

1.0.1.0

Uuid primary key for Laravel Eloquent Models

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leonardo Marquine

laravel uuid eloquent

24/09 2016

1.0

1.0.0.0

Uuid primary key for Laravel Eloquent Models

  Sources   Download

MIT

The Requires

 

The Development Requires

by Leonardo Marquine

laravel uuid eloquent