public static function boot() { parent::boot(); static::registerDefaultEvents(); static::creating(function ($model) { $model->beforeCreate(); }); }