LaravelPackages.net
Acme Inc.
Toggle sidebar
hnhdigital-os/laravel-model-uuid

Provides UUID datatype support for the Eloquent ORM

250
1
1.0.9
About hnhdigital-os/laravel-model-uuid

hnhdigital-os/laravel-model-uuid is a Laravel package for provides uuid datatype support for the eloquent orm. It currently has 1 GitHub stars and 250 downloads on Packagist (latest version 1.0.9). Install it with composer require hnhdigital-os/laravel-model-uuid. Discover more Laravel packages by hnhdigital-os or browse all Laravel packages to compare alternatives.

Last updated

    __                                ____  ____  __________ 
   / /   ____ __________ __   _____  / / / / / / / /  _/ __ \
  / /   / __ `/ ___/ __ `/ | / / _ \/ / / / / / / // // / / /
 / /___/ /_/ / /  / /_/ /| |/ /  __/ / /_/ / /_/ // // /_/ / 
/_____/\__,_/_/   \__,_/ |___/\___/_/\____/\____/___/_____/  
                                                             

Adds support for the UUID datatype column for models.

Latest Stable Version Total Downloads Latest Unstable Version Built for Laravel License

Build Status StyleCI Test Coverage Issue Count Code Climate

This package has been developed by H&H|Digital, an Australian botique developer. Visit us at hnh.digital.

Installation

Via composer:

$ composer require hnhdigital-os/laravel-model-uuid ~1.0

Usage

Basic

The feature is exposed through a trait by casting your UUID columns as uuid.

use Bluora\ModelUuidColumn\UuidTrait;

class User extends Model
{
    use UuidTrait;

    protected $casts = [
        'id' => 'integer',
        'uuid' => 'uuid'
    ];
}

Querying the UUID column

You can then query the UUID column through whereUuid (single uuid) and whereUuidIn (many uuid's) methods.

Contributing

Please see CONTRIBUTING for details.

Credits

License

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

Star History Chart