Skip to content

krowinski/laravel-tinyid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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