ubah ke docker mode
This commit is contained in:
No files matched your search
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Chatify\Traits;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
trait UUID
|
||||
{
|
||||
protected static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
static::creating(function ($model) {
|
||||
$model->{$model->getKeyName()} = (string) Str::uuid();
|
||||
});
|
||||
}
|
||||
|
||||
public function getIncrementing ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getKeyType ()
|
||||
{
|
||||
return 'string';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user