devkylian / laravel-uuid
Eloquent UUID Trait for Laravel 6 and above.
Installs: 117
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:plugin
Requires
- php: ^7.4|^8.2
- illuminate/database: ^6|^7|^8|^9|^10
- illuminate/support: ^6|^7|^8|^9|^10
This package is auto-updated.
Last update: 2024-04-06 20:09:36 UTC
README
Eloquent UUID Trait for Laravel 6 and above.
Installation
composer require devkylian/laravel-uuid
Usage
Add this in your migrations
Schema::create('users', function (Blueprint $table) { $table->uuid('id')->primary(); $table->string('username'); $table->string('email')->unique(); $table->string('password'); $table->rememberToken(); $table->timestamps(); });
Add this in your models
<?php namespace App; use Illuminate\Database\Eloquent\Model; use DevKylian\Uuid\HasUuid; class User extends Model { use HasUuid; }