Generate children of children URLS

$p = page(‘sale’)->children()->create(str::slug(rand ( 1 , 50000 ) . ‘-’ . $data[‘title’]) , ‘submit’, $data);

I have this that creates /sale/{random}-{title}

How would I be able to change this so that it creates /sale/{random}/{title}

I’ve just noticed my other problem… using a random number pre-appended to the title alters how kirby processes the URL. Any ideas?

You have already asked that here: Unique URLs in kirby