Download the PHP package cviebrock/artisan-hash without Composer
On this page you can find all versions of the php package cviebrock/artisan-hash. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cviebrock/artisan-hash
More information about cviebrock/artisan-hash
Files in cviebrock/artisan-hash
Package artisan-hash
Short Description Adds Artisan tasks to Laravel to work with password hashes from the CLI.
License MIT
Informations about the package artisan-hash
artisan-hash
Adds Artisan tasks to Laravel to work with password hashes from the CLI.
- Installation
- Usage
- Bugs, Suggestions and Contributions
- Copyright and License
Installation
First, add the package to the require-dev
attribute of your composer.json
file:
You could add it to the
require
section instead, but you likely only need this during development.
Next, update Composer from the Terminal:
Once this operation completes, add the service provider. Open app/config/app.php
, and add a new item to the providers array.
That's it! Run the artisan
command from the Terminal to see the new commands.
Usage
hash:make
This will hash the given plaintext string and output the hash to the console. If you don't provide a string, you will be asked to enter one (this will keep the plaintext string out of your shell history).
hash:check
This will compare a given hash to a plaintext string and see if they match.
Note that if the hash contains dollar signs -- as it likely will -- you will need to escape them in your shell. The easiest way is just to surround the hash in single quotes, or don't provide the hash via the command and use the prompt.
The command will also check if the hash needs rehashing.
Bugs, Suggestions and Contributions
Please use Github for bugs, comments, suggestions.
- Fork the project.
- Create your bugfix/feature branch and write your (well-commented) code.
- Create unit tests for your code:
- Run
composer install --dev
in the root directory to install required testing packages. - Add your test methods to
artisan-hash/tests/
. - Run
vendor/bin/phpunit
to the new (and all previous) tests and make sure everything passes.
- Run
- Commit your changes (and your tests) and push to your branch.
- Create a new pull request against the artisan-hash
develop
branch.
Please note that you must create your pull request against the develop
branch.
Copyright and License
artisan-hash was written by Colin Viebrock and released under the MIT License. See the LICENSE file for details.
Copyright 2014 Colin Viebrock