woodynadobhar / laravel-stupid-password
A laravel package wrapper for northox/stupid-password
Installs: 1 318
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- northox/stupid-password: ^2.0
This package is auto-updated.
Last update: 2024-12-18 05:31:40 UTC
README
A laravel package wrapper for northox/stupid-password.
Installation
Via Composer
$ composer require woodynadobhar/laravelstupidpassword
Add config
$ artisan vendor:publish
Usage
Automagically
In the relevant 'password' validation rule(s), add 'stupidpassword':
'password' => 'min:6|required_with:password_confirmation|same:password_confirmation|stupidpassword',
By hand
use WoodyNaDobhar\LaravelStupidPassword\LaravelStupidPassword; $stupidPass = new LaravelStupidPassword(Config::get('laravelstupidpassword.max'), Config::get('laravelstupidpassword.environmentals'), null, null, config('laravelstupidpassword.options')); if($stupidPass->validate($input['password']) === false) { $errors = ''; foreach($stupidPass->getErrors() as $error) { $errors .= $error . '<br />'; } Flash::error('Your password is weak:<br \>' . substr($errors, 0, -6)); return redirect(URL::previous()); }
Package dependencies
This is a laravel wrapper for Northox Stupid Password
Change log
Please see the changelog for more information on what has changed recently.
Source
https://github.com/WoodyNaDobhar/laravel-stupid-password
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please contact northox instead of using the issue tracker.
Version
Versioning is for chumps.
Credits
- Danny Fullerton Stupid Password library
- Krisjanis Ozolins Package template
- All Contributors
License
BSD license. In other words, it's free software, almost free as in free beer.