jorenvanhocht/hashify
Larablocks Analysis
jorenvanhocht/hashify works with Laravel 5 (latest release v3.0, Feb 1, 2017), which reached end of life: no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 5, past end of life
- No release in the last 12 months (last: Feb 1, 2017)
- 0 downloads a month (needs 10,000)
- 1 GitHub star (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Feb 1, 2017.
- No releases in the last 12 months.
- First released: Mar 25, 2016.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.
| Install | |
|---|---|
composer require jorenvanhocht/hashify |
|
| Latest Version: | v3.0 |
| Laravel: | 5 |
| License: | MIT |
| Last Updated: | Feb 1, 2017 |
| Links: | GitHub · Packagist |
Hashify
This Laravel package makes it easy to generate random strings from a given charset. It can also generate database table and/or column unique strings.
Installation
This package can be installed through Composer.
composer require jorenvanhocht/hashify
You must register the service provider.
// config/app.php
'provider' => [
...
jorenvanhocht\Hashify\Providers\HashifyServiceProvider::class,
...
];
This package also comes with a facade, which provides an easy way to call the class.
// config/app.php
'aliases' => [
...
'Hashify' => jorenvanhocht\Hashify\Facades\Hashify::class,
...
];
You can publish the config file of this package with this command:
php artisan vendor:publish --provider="jorenvanhocht\Hashify\HashifyServiceProvider"
The following config file will be published in config/hashify.php
<?php
return [
'charsets' => [
'database' => 'ABCDEFGHIJKLMNOPQRSTUVWabcdefghijklmnopqrstuvw0123456789',
],
];
Usage
private $hashify;
public function __construct(Hashify $hashify)
{
$this->hashify = $hashify;
}
public function myMethod()
{
// random string
echo $this->hashify->make($minLength, $maxLength);
// database unique random string
echo $this->hashify->make()->unqique('users');
echo $this->hashify->make()->unqique('users', 'colName');
echo $this->hashify->make(2, 10)->unqique('users', 'colName');
}
To do
The usage of different char sets.
License
The MIT License (MIT). Please see License File for more information.
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | Laravel | License |
|---|---|---|---|
| v3.0 | ~v5.2 | MIT | |
| v2.1 | ~v5.2 | MIT | |
| v2.0 | ~v5.2 | MIT | |
| v1.0 | 5.2.* | MIT |