fix bug column text is can't have default value

This commit is contained in:
Geriano
2022-10-14 07:58:04 +07:00
parent 46fba12a92
commit 9a7a0d504f
2 changed files with 18 additions and 1 deletions

View File

@@ -106,4 +106,19 @@ class Menu extends Model
get: fn () => $this->counter_handler ? new $this->counter_handler : null,
);
}
/**
* @inheritdoc
*/
public static function boot()
{
parent::boot();
static::bootTraits();
static::creating(function (Menu $menu) {
if (empty($menu->actives)) {
$menu->actives = [];
}
});
}
}