Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krowinski/laravel-tinyid
A TinyID bridge for Laravel
https://github.com/krowinski/laravel-tinyid
bridge composer-packages laravel php tinyid
Last synced: 1 day ago
JSON representation
A TinyID bridge for Laravel
- Host: GitHub
- URL: https://github.com/krowinski/laravel-tinyid
- Owner: krowinski
- License: mit
- Created: 2019-04-08T20:20:21.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-08T21:48:43.000Z (over 5 years ago)
- Last Synced: 2024-04-18T17:48:14.574Z (7 months ago)
- Topics: bridge, composer-packages, laravel, php, tinyid
- Language: PHP
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# laravel-tinyid
A TinyID bridge for Laravel## Installation
Require this package, with [Composer](https://getcomposer.org/), in the root directory of your project.
```bash
$ composer require krowinski/laravel-tinyid
```If you want you can use the [facade](http://laravel.com/docs/facades). Add the reference in `config/app.php` to your aliases array.
```php
'TinyID' => LaravelTinyID\Facades\TinyID::class
```## Configuration
Laravel TinyID requires connection configuration. To get started, you'll need to publish all vendor assets:
```bash
$ php artisan vendor:publish
```This will create a `config/tinyID.php`
### Examples
```php
var_dump(TinyId::encode('48888851145')); // will print 1FN7Ab
var_dump(TinyId::decode('1FN7Ab')); // will print 48888851145
```