Load UUID plugins to Kirby CMS

Hi,
How to load this plugin into Kirby CMS and use it to generate UUID ?

I put it into site/plugins and try to call a “Uuid Class” from another PHP files but it does not working so easily…

Thank you

  1. Create a new folder in /site/plugins, e.g. /kirby-uuid
  2. Inside that folder, create an index.php
  3. Enter this new folder and require the library composer require ramsey/uuid
  4. Autoload your dependency in index.php

Thank you.
Is there a way to do it without composer ?

As the readme says, composer is the preferred installation method, but you could download or clone from GitHub and then require in your plugin manually.

Are you aware of @bnomei’s Auto ID plugin?

Yes thank you but I’m looking for UUID and not UID.
Do you know if I can generate UUID with kirby3-autoid ?

1 Like

if you need a random token generated by autoid plugin to use outside of the autoid field then call the default generator anywhere in your code.

\Bnomei\AutoID::defaultGenerator()