<?php

namespace App\Http\Controllers\Util;

use App\Models\Sequence;

class CodeGeneratorService
{

    public static function generateRegisterV2() {

        $sequence = Sequence::firstOrCreate([]);
        $lastNumber = $sequence->last_number + 1;
        $sequence->update(['last_number' => $lastNumber]);

        return 'LASWARCO/' .  str_pad($lastNumber, 3, '0', STR_PAD_LEFT);
    }


}
