first commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Traits;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
trait Uuid
|
||||
{
|
||||
protected static function boot(){
|
||||
parent::boot();
|
||||
static::creating(function ($model) {
|
||||
$model->uuid = (string) Str::uuid();
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user