Download the PHP package alexanderzon/laravel-hashids without Composer
On this page you can find all versions of the php package alexanderzon/laravel-hashids. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-hashids
Hashids for Laravel 5
This package uses the classes created by hashids.org
Generate hashes from numbers, like YouTube or Bitly. Use hashids when you do not want to expose your database ids to the user.
Installation
- Hashids on Packagist
- Hashids on GitHub
- Laravel 4 Installation
To get the latest version of Hashids simply require it in your composer.json
file.
"alexanderzon/laravel-hashids": "dev-master"
You'll then need to run composer install
to download it and have the autoloader updated.
Once Hashids is installed you need to register the service provider with the application. Open up config/app.php
and find the providers
key.
There is no need to add the Facade, the package will add it for you.
Publish the configurations
Run this on the command line from the root of your project:
$ php artisan config:publish alexanderzon/laravel-hashids
A configuration file will be publish to config/laravel-hashids.php
.
Laravel 4 Installation
Add verison 1.0 of Hashids in your composer.json
file.
"alexanderzon/laravel-hashids": "3.0.*"
And following the directions in the README on version 1.0.
Usage
Once you've followed all the steps and completed the installation you can use Hashids.
Encodeing
You can simply encode a single id:
or multiple..
Decodeing
or multiple..
Changelog
2.0.0
- Upgraded to Laravel 5
- Upgraded to Hashids 1.0.5
1.0.0
-
Several public functions are renamed to be more appropriate:
- Function
encrypt()
changed toencode()
- Function
decrypt()
changed todecode()
- Function
encryptHex()
changed toencodeHex()
- Function
decryptHex()
changed todecodeHex()
Hashids was designed to encode integers, primary ids at most. Hashids is the wrong algorithm to encrypt sensitive data. So to encourage more appropriate use,
encrypt/decrypt
is being "downgraded" toencode/decode
. - Function
- Version tag added:
1.0
README.md
updated
All credit for Hashids goes to Ivan Akimov (@ivanakimov), thanks to for making it!