Bagaimana Saya Dapat Menghasilkan ID Transaksi Unik di Laravel 8

class Transaction extends Model {
 ...
 public static function boot()
 {
        parent::boot();
        self::created(function ($model) { 
            $model->transaction_id = 'NMB-BOO-' . str_pad($model->id, 7, "0", STR_PAD_LEFT);
            $model->save();
        });
 }
}
SAMER SAEID