<?php

namespace App\Actions;

use Illuminate\Support\Str;

class GenerateCodeAction
{
    public static function action($length=4){
        $code = null;

        for ($i=0; $i < $length; $i++)
            $code .= rand(0, 9);

        return strtoupper(Str::random(2)).'_'.$code;
    }
}
