Easily reset your password from dashboard on Nova 4.
- PHP ~8.0
- Laravel
- Laravel Nova 4
Register tool in tools
method of the NovaServiceProvider
:
// in app/Providers/NovaServiceProvider.php
public function tools()
{
return [
// ...
(new \Websnack\ResetPassword\ResetPassword()),
];
}
After installation, you can find the tool in the sidebar of admin panel dashboard. if you have added a custom userMenu you have to manuel add the link to the tool like shown below.
// in app/Providers/NovaServiceProvider.php
Nova::userMenu(static function (Request $request, Menu $menu) {
return $menu
// ...
->append(MenuItem::externalLink('Reset Password', '/reset-password'))
}),
Export config file to change position settings or minimum password length
php artisan vendor:publish --tag="nova-reset-password-config"
Open and edit file config/nova-password-reset.php
'min_password_length' => 8
'show_on_sidebar' => true,
'show_on_profile_menu' => true,