Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

How to Generate New Password in Laravel?

How to Generate New Password in Laravel?

Step 1. Create a new Project in Laravel, so Open git Bash. Write down the following command:-

$ composer create-project --prefer-dist laravel/laravel changepassword "5.8.*"

Step 2. Now, Move to project directory on git Bash, so write down the following command:-

$ cd changepassword

Mysql Database connection Laravel

Step 3. Now, we have to Create a new DatabaseGo to XAMPP server->phpMyAdmin->Click New Database->changepassword.

Step 4. Now, Go to .env file to set the project path and give the project APP_URL, DB_DATABASE name and DB_USERNAME name.

Step 5.  Create the user authentication scaffoldingWrite down the following command:-

$ php artisan make:auth

Step 6.  Thereafter, Migrate tables into the MySQL databaseWrite the following command within git Base.

$ php artisan migrate

Step 7. Go to app/Http/Controller/HomeController.php file and write down this following code:-

Step 8. Go to resources/views/home.blade.php file and write down this following code:-

Step 9. Go to Route/web.php file and write down this following code:-

Route::post('/home', 'HomeController@changePasswordUpdate')->name('home');

Login

Checking the current password matches or not with the provided password

Checking new password should not be same with the current password

Password changed Successfully

Thanks