2017 © Pedro Peláez
 

library laravel-hashids

A hashids wrapper for Laravel and Lumen.

image

nblackburn/laravel-hashids

A hashids wrapper for Laravel and Lumen.

  • Friday, July 27, 2018
  • by nblackburn
  • Repository
  • 0 Watchers
  • 7 Stars
  • 3,622 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 3 Open issues
  • 11 Versions
  • 42 % Grown

The README.md

Hashids

A hashids wrapper for Laravel & Lumen., (*1)

Installation

Laravel

Inside config/app.php add the following line in your providers, (*2)

LaravelHashids\Providers\LaravelServiceProvider::class

and then simply run the following artisan command..., (*3)

php artisan config:publish nblackburn/laravel-hashids

Facade

To add facade support for Laravel, add the following line inside your config/app.php under the alias section..., (*4)

'Parsedown' => LaravelParsedown\Facades\Parsedown::class,

Lumen

Inside bootstrap/app.php, add the following line:, (*5)

$app->register(LaravelHashids\Providers\LumenServiceProvider::class);

then add the following to your .env file:, (*6)

# HASHIDS

HASHIDS_SALT = YOURSECRETKEY
HASHIDS_LENGTH = 8
HASHIDS_ALPHABET = abcedfghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPAQRSTUVWXYZ1234567890

Facade

To add facade support, firstly uncomment the following line within bootstrap/app.php:, (*7)

// $app->withFacades();

then register the facade like so..., (*8)

$app->register(LaravelHashids\Facades\Hashids::class);

Settings

name description default
salt The secret used for hashing. MYREALLYSECRETSALT
length The maximum length of the hash. 10
alphabet The characters used for hashing. abcedefghijklmnopqrstuvwxyzABCEDEFGHIJKLMNOPQRSTUVWXYZ123456890

Usage

Encode

Encode a series of integers, (*9)

app('hashids')->encode(...$integers);

or with the facade, (*10)

Hashids::encode(...$integers);

Decode

Decode a encoded string back to the original integers, (*11)

app('hashids')->decode($encoded);

or with the facade, (*12)

Hashids::decode($encoded);

License

This library is licensed under MIT, see license.md for details., (*13)

Donations

, (*14)

The Versions

27/07 2018

dev-dependabot/composer/illuminate/support-5.6.29

dev-dependabot/composer/illuminate/support-5.6.29

A hashids wrapper for Laravel and Lumen.

  Sources   Download

MIT

The Requires

 

The Development Requires

18/07 2018

dev-dependabot/composer/illuminate/support-5.6.28

dev-dependabot/composer/illuminate/support-5.6.28

A hashids wrapper for Laravel and Lumen.

  Sources   Download

MIT

The Requires

 

The Development Requires

16/07 2018

dev-dependabot/composer/phpunit/phpunit-7.2.7

dev-dependabot/composer/phpunit/phpunit-7.2.7

A hashids wrapper for Laravel and Lumen.

  Sources   Download

MIT

The Requires

 

The Development Requires

06/06 2018

dev-dependabot/composer/hashids/hashids-3.0.0

dev-dependabot/composer/hashids/hashids-3.0.0

A hashids wrapper for Laravel and Lumen.

  Sources   Download

MIT

The Requires

 

The Development Requires

06/06 2018

dev-master

9999999-dev

A hashids wrapper for Laravel and Lumen.

  Sources   Download

MIT

The Requires

 

The Development Requires

25/05 2018

dev-dependabot/composer/phpunit/phpunit-7.1.5

dev-dependabot/composer/phpunit/phpunit-7.1.5

A hashids wrapper for Laravel and Lumen.

  Sources   Download

MIT

The Requires

 

The Development Requires

25/05 2018

dev-dependabot/composer/illuminate/support-5.6.23

dev-dependabot/composer/illuminate/support-5.6.23

A hashids wrapper for Laravel and Lumen.

  Sources   Download

MIT

The Requires

 

The Development Requires

01/02 2018

dev-dependabot/composer/illuminate/support-5.4.36

dev-dependabot/composer/illuminate/support-5.4.36

A hashids wrapper for Laravel and Lumen.

  Sources   Download

MIT

The Requires

 

The Development Requires

01/02 2018

dev-dependabot/composer/hashids/hashids-2.0.4

dev-dependabot/composer/hashids/hashids-2.0.4

A hashids wrapper for Laravel and Lumen.

  Sources   Download

MIT

The Requires

 

The Development Requires

18/12 2017

dev-dependabot/composer/phpunit/phpunit-5.7.26

dev-dependabot/composer/phpunit/phpunit-5.7.26

A hashids wrapper for Laravel and Lumen.

  Sources   Download

MIT

The Requires

 

The Development Requires

11/01 2016

1.2.4

1.2.4.0

A hashids wrapper for Laravel and Lumen.

  Sources   Download

MIT

The Requires

 

The Development Requires