rits-tecnologia/laravel-model-uuid

Laravel Model UUID

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/rits-tecnologia/laravel-model-uuid

1.0.0 2022-01-28 17:27 UTC

This package is auto-updated.

Last update: 2025-09-29 02:30:12 UTC


README

This package provides UUID automatic generation for Laravel Models.

Installation

Install this package with composer.

composer require rits-tecnologia/laravel-model-uuid

Usage

Change your migration primary key

// change this
$table->id();

// to this
$table->uuid('id')->primary();

Add trait to your model

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class User extends Model
{
    use GeneratesUuid;
}