Skip to content

nurzico/cakephp-hashids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

cakephp-hashids

Hashids Component for CakePHP 2.x

Usage

First, get Hashids.php from http://www.hashids.org/php/ and put it in your app's Vendor/Hashids folder.

Then, add this to your AppController.php:

public $components = array (
	// ...
	'Hashids' => array (
		'salt' => 'YOUR_SALT_HERE', // Required
		'min_hash_length' => 0, // Optional
		'alphabet' => '', // Optional
	)
);

And use on your Controllers like this:

$this->Hashids->encrypt(1, 2, 3);

Or in your Components, Views or anywhere else:

HashidsComponent::encrypt(1, 2, 3);

About

Hashids Component for CakePHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages