webdevrus / laravel-uuid
UUID
1.0.0
2021-02-04 16:46 UTC
Requires
- php: ^7.0
This package is auto-updated.
Last update: 2024-09-05 00:40:29 UTC
README
Install
$ composer require webdevrus/laravel-uuid
Using
Model
<?php namespace App\Models; use WebDevRus\Laravel\UUID; class Cart extends Model { use UUID; ... }
Migration
$table->uuid('uuid')->primary();
Custom Column
Model
<?php namespace App\Models; use WebDevRus\Laravel\UUID; class Cart extends Model { use UUID; ... public function getKeyName(): string { return 'custom'; } }
Migration
$table->uuid('custom')->primary();