andach/laravel-primary-key-uuid

This is an incredibly simple package to add a simple trait for Laravel models where the primary key is a UUID.

1.0.0 2023-09-13 12:38 UTC

This package is auto-updated.

Last update: 2024-04-13 14:02:49 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is an incredibly simple package to add a simple trait for Laravel models where the primary key is a UUID.

Installation

You can install the package via composer:

composer require andach/laravel-primary-key-uuid

There are no migrations, views or config file.

Usage

<?php

namespace App\Models;

use Andach\LaravelPrimaryKeyUuid\Traits\PrimaryKeyUUID;

class MyModel extends Model
{
    use PrimaryKeyUUID;
    
    // ...
}

Testing

composer test

Credits

License

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