winnie/laravelchangepassword
Composer 安装命令:
composer require winnie/laravelchangepassword
包简介
:Laravel framework change password functionality.
README 文档
README
Laravel framework change password functionality. I assume you use built-in laravel authentication / laravel ui.
Installation
- Require the Package via Composer
$ composer require winnie/laravelchangepassword
- Then add the service provider to
config/app.php. In Laravel versions 5.5 and beyond, this step can be skipped if package auto-discovery is enabled.
'providers' => [ ... Winnie\LaravelChangePassword\LaravelChangePasswordServiceProvider::class ... ];
- Publish the configuration file:
$ php artisan vendor:publish --provider="Winnie\LaravelChangePassword\LaravelChangePasswordServiceProvider"
Usage
Add this to your routes/web.php
LaravelChangePassword::routes();
You can visit this route for change password your-website/password/change
You can also use this route name
{{ route('password.change') }}
Example:
<a class="dropdown-item" href="{{ route('password.change') }}"> {{ __('Change Password') }} </a>
You can edit the config file to change settings at config/laravelchangepassword.php.
<?php return [ // Redirect after changing password to 'redirect_to' => '/home', // Enable current password field 'enable_current_password' => true, // Validation error message. 'current_password_error_msg' => 'Your current password is incorrect.', // ALert success message 'current_password_success_msg' => 'Password change successfully!', ];
If you want to override views, navigate to resources/views/vendor/winnie/auth/passwords/change.blade.php
If you want to include beautiful toaster notification add this blade directives below.
<!doctype html> <html> <head> <title>Toastr.js</title> @toastr_css </head> <body> </body> @jquery @toastr_js @toastr_render </html>
Change log
Please see the changelog for more information on what has changed recently.
Todo
Create test
Testing
$ composer test
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
Credits
License
MIT.
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-08
