PHP Classes

Laravel Tiny ID: Laravel service to generate opaque identifiers

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 22 All time: 11,306 This week: 455Up
Version License PHP version Categories
laravel-tinyid 1.0.0MIT/X Consortium ...5PHP 5, Text processing, Libraries
Description 

Author

This package provides a Laravel service to generate opaque identifiers.

It provides a service based on the Laravel framework that can take as parameter a given string that could be a URL for instance, and generates an identifier of short length to map the original string using the Tiny ID package.

The package Laravel service can also take a given tiny identifier generated by the Tiny ID package and returns the original long string value.

Picture of Kacper Rowinski
  Performance   Level  
Innovation award
Innovation award
Nominee: 8x

 

Documentation

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

  Files folder image Files (8)  
File Role Description
Files folder imagesrc (2 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:22
This week:0
All time:11,306
This week:455Up