PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Kacper Rowinski   Laravel Tiny ID   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Laravel Tiny ID
Laravel service to generate opaque identifiers
Author: By
Last change:
Date: 4 years ago
Size: 780 bytes
 

Contents

Class file image Download

laravel-tinyid

A TinyID bridge for Laravel

Installation

Require this package, with Composer, in the root directory of your project.

$ composer require krowinski/laravel-tinyid

If you want you can use the facade. Add the reference in config/app.php to your aliases array.

  'TinyID' => LaravelTinyID\Facades\TinyID::class

Configuration

Laravel TinyID requires connection configuration. To get started, you'll need to publish all vendor assets:

$ php artisan vendor:publish

This will create a config/tinyID.php

Examples

var_dump(TinyId::encode('48888851145')); // will print 1FN7Ab
var_dump(TinyId::decode('1FN7Ab')); // will print 48888851145