LaravelPackages.net
Acme Inc.
Toggle sidebar
jasonmccallister/laravel-uuid-as-id

Simple Laravel package that includes a trait for using UUIDs and IDs on Eloquent models

24
0
v0.1.0
About jasonmccallister/laravel-uuid-as-id

jasonmccallister/laravel-uuid-as-id is a Laravel package for simple laravel package that includes a trait for using uuids and ids on eloquent models. It currently has 0 GitHub stars and 24 downloads on Packagist (latest version v0.1.0). Install it with composer require jasonmccallister/laravel-uuid-as-id. Discover more Laravel packages by jasonmccallister or browse all Laravel packages to compare alternatives.

Last updated

Use UUID as ID in Laravel

Latest Version on Packagist Total Downloads

This is a simple trait that will override the key on an eloquent model to create a UUID instead of an integer.

Installation

You can install the package via composer:

composer require jasonmccallister/laravel-uuid-as-id

Usage

Update your models to use the trait, and you are done!

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use JasonMcCallister\UuidAsId\Traits\UuidAsId;

class SomeModel extends Model
{
    use UuidAsId;

    // the rest of your model's code
}

Testing

composer test

Credits

License

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

Star History Chart