Changing page uid or generate unique uid

I read related discussions and tried $page->move() but guess this method unavailable?

Following way not working too:

$page->update(array('uid' => 'newuid'));

Or how can i generate unique uid?


The code


should work. Do you get any error message?

No any errors, tried following:

kirby()->hook('', function($page) {
    return $page->move('newuid');

Wait a minute, this works. I used AutoID plugin, checking…

thx @lukasbestle solved without plugin.