This commit is contained in:
2026-04-13 14:20:47 +07:00
parent d9a66e19be
commit e242d2aa04
+9 -9
View File
@@ -38,15 +38,15 @@ class Facilitator extends Model
];
// Boot method untuk otomatis mengisi UUID saat create
protected static function boot()
{
parent::boot();
static::creating(function ($model) {
if (empty($model->id)) {
$model->id = (string) Str::uuid();
}
});
}
// protected static function boot()
// {
// parent::boot();
// static::creating(function ($model) {
// if (empty($model->id)) {
// $model->id = (string) Str::uuid();
// }
// });
// }
// Jika ingin menggunakan created_date dari JSON sebagai pengganti created_at Laravel
const CREATED_AT = 'created_date';