nicoorfi/prefix-id

Generate unique, URL-safe, alphanumeric IDs with a specified prefix.

v1.0.1 2024-07-24 08:11 UTC

This package is auto-updated.

Last update: 2024-10-24 08:36:29 UTC


README

This is a PHP library for generating unique, URL-safe, alphanumeric IDs with a specified prefix. This is useful for generating unique identifiers for various resources in web applications.

Installation

You can install the package via Composer:

composer require nicoorfi/prefix_id

Usage

<?php
require 'vendor/autoload.php';

$token = prefix_id(prefix: 'sgm', length: 24)

echo $token // sgm_MF0e5Ng0xJc1zMv3A0T4f0n2