andregumieri/laravel-uxid

There is no license information available for the latest version (1.0.3) of this package.

1.0.3 2024-07-23 12:56 UTC

This package is auto-updated.

Last update: 2025-03-23 14:17:10 UTC


README

Migrations

UXID

Instead of using $table->id() use $table->uxid() (short for $table->string('id')->primary)

Foreign

    ...
    $table->foreignUxidFor(ModelWithUxid::class)
    ...

Models

use AndreGumieri\LaravelUxid\Database\Eloquent\Concerns\HasUxid;

class User extends Model
{
    use HasUxid;
}