-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
254 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
/.idea/ | ||
/_arcanedev/ | ||
/build/ | ||
/vendor/ | ||
composer.lock | ||
composer.phar | ||
/composer.lock | ||
/composer.phar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Hasher | ||
|
||
The Hasher package provides a flexible hash manager for Laravel. | ||
|
||
## Features | ||
|
||
* Easy setup & configuration. | ||
* Well documented & IDE Friendly. | ||
* Well tested with maximum code quality. | ||
* Laravel `4.2| 5.0 | 5.1 | 5.2 | 5.3` are supported. | ||
* Made with :heart: & :coffee:. | ||
|
||
## Table of contents | ||
|
||
1. [Requirements](1-Requirements.md) | ||
3. [Installation and Setup](2-Installation-and-Setup.md) | ||
4. [Configuration](3-Configuration.md) | ||
5. [Usage](4-Usage.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# 1. Requirements | ||
|
||
## Table of contents | ||
|
||
0. [Home](0-Home.md) | ||
1. [Requirements](1-Requirements.md) | ||
2. [Installation and Setup](2-Installation-and-Setup.md) | ||
3. [Configuration](3-Configuration.md) | ||
4. [Usage](4-Usage.md) | ||
|
||
## Server Requirements | ||
|
||
The Hasher package has a few system requirements: | ||
|
||
``` | ||
- PHP >= 5.6 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# 2. Installation | ||
|
||
## Table of contents | ||
|
||
0. [Home](0-Home.md) | ||
1. [Requirements](1-Requirements.md) | ||
2. [Installation and Setup](2-Installation-and-Setup.md) | ||
3. [Configuration](3-Configuration.md) | ||
4. [Usage](4-Usage.md) | ||
|
||
## Composer | ||
|
||
You can install this package via [Composer](http://getcomposer.org/) by running this command: `composer require arcanedev/hasher`. | ||
|
||
Or by adding the package to your `composer.json`. | ||
|
||
```json | ||
{ | ||
"require": { | ||
"arcanedev/hasher": "~1.0" | ||
} | ||
} | ||
``` | ||
|
||
Then install it via `composer install` or `composer update`. | ||
|
||
## Laravel | ||
|
||
### Setup | ||
|
||
Once the package is installed, you can register the service provider in `config/app.php` in the `providers` array: | ||
|
||
```php | ||
// config/app.php | ||
|
||
'providers' => [ | ||
... | ||
Arcanedev\Hasher\HasherServiceProvider::class, | ||
], | ||
``` | ||
|
||
(**Optional**) And for the Facades: | ||
|
||
```php | ||
// config/app.php | ||
|
||
'aliases' => [ | ||
... | ||
'Hasher' => Arcanedev\Hasher\Facades\Hasher::class, | ||
]; | ||
``` | ||
|
||
### Artisan commands | ||
|
||
To publish the config file, run this command: | ||
|
||
```bash | ||
php artisan vendor:publish --provider="Arcanedev\Hasher\HasherServiceProvider" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# 3. Configuration | ||
|
||
## Table of contents | ||
|
||
0. [Home](0-Home.md) | ||
1. [Requirements](1-Requirements.md) | ||
2. [Installation and Setup](2-Installation-and-Setup.md) | ||
3. [Configuration](3-Configuration.md) | ||
4. [Usage](4-Usage.md) | ||
|
||
After you've published the config file `config/hasher.php`, you can customize the settings : | ||
|
||
## Clients | ||
|
||
```php | ||
return [ | ||
/* ------------------------------------------------------------------------------------------------ | ||
| Clients | ||
| ------------------------------------------------------------------------------------------------ | ||
*/ | ||
'client' => 'hashids', | ||
|
||
'clients' => [ | ||
'hashids' => Arcanedev\Hasher\Clients\HashidsClient::class, | ||
], | ||
|
||
//... | ||
]; | ||
``` | ||
|
||
You can specify the default `client` to use for hashing and also the list of `clients` that are supported with the class associated with. | ||
|
||
You can also override the hasher class by replacing the *client value*. | ||
|
||
## Connections | ||
|
||
```php | ||
return [ | ||
// ... | ||
|
||
/* ------------------------------------------------------------------------------------------------ | ||
| Connections | ||
| ------------------------------------------------------------------------------------------------ | ||
*/ | ||
'connection' => 'main', | ||
|
||
'connections' => [ | ||
'hashids' => [ | ||
'main' => [ | ||
'salt' => '', | ||
'length' => 0, | ||
'alphabet' => '', | ||
], | ||
'alt' => [ | ||
'salt' => '', | ||
'length' => 0, | ||
'alphabet' => '', | ||
], | ||
], | ||
], | ||
]; | ||
``` | ||
|
||
The `connection` is the options for the hasher client to use for hashing. | ||
|
||
You can specify multiple connections for each client, like `main` and `alt`, it allows you to hash multiple entities in your app with different hashing results. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# 4. Usage | ||
|
||
## Table of contents | ||
|
||
0. [Home](0-Home.md) | ||
1. [Requirements](1-Requirements.md) | ||
2. [Installation and Setup](2-Installation-and-Setup.md) | ||
3. [Configuration](3-Configuration.md) | ||
4. [Usage](4-Usage.md) | ||
|
||
> Coming soon … |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.