krowinski/laravel-tinyid

A TinyID bridge for Laravel

v1.0 2019-04-08 21:44 UTC

This package is auto-updated.

Last update: 2024-10-12 02:14:27 UTC


README

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