2017 © Pedro Peláez
 

library eloquent-uuid

A package designed to get your eloquent models up and running with UUIDs quickly.

image

marklj/eloquent-uuid

A package designed to get your eloquent models up and running with UUIDs quickly.

  • Sunday, July 31, 2016
  • by marklj
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Simple Eloquent UUID

This project is experimental and should not be used on real-life applications., (*1)

This is a very simple project that will get you up and running with UUID's within your eloquent models., (*2)

Usage

<?php 
    // Object creation
    $foo = FooModel::create();
    print $foo->uuid; // outputs: feb9035d-e9e2-4913-b6d5-695d0d67f882

    // Object retrieval
    $result = FooModel::find('feb9035d-e9e2-4913-b6d5-695d0d67f882');
    print $foo->uuid; // outputs: feb9035d-e9e2-4913-b6d5-695d0d67f882

Database Setup

In your database migration for your model, you should have the UUID field set up like the following:, (*3)

```php <?php public function up() { Schema::create('foo_table', function (Blueprint $table) { $table->binary('uuid', 16);, (*4)

        // ...
    });
}

The Versions

31/07 2016

dev-master

9999999-dev

A package designed to get your eloquent models up and running with UUIDs quickly.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mark Johnson