Skip to content

🪞Simple and fast nanoId generation library

License

Notifications You must be signed in to change notification settings

ludo237/nanoid-php

Repository files navigation

NanoID PHP Library

A simple, ready to use, PHP 8 ready library for generating NanoIDs.

What is a NanoID?

NanoID is a short, easy to select with double click, low chance of collision, easy to generate and human readable unique identifier.

Install

Using composer

composer require ludo237/nanoid-php

Usage

The library is straightforward to use. Instantiate a new Client object and call the generate method to get a new random ID. Simple as that.

use Ludo237\Nanoid\Client;

$client = new Client();
$id = $client->generate();

Customizations