Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  How-Tos  >  Know How to Reset Laravel Admin Passwords from Database?

Know How to Reset Laravel Admin Passwords from Database?

 2 min

Laravel is an open-source PHP framework that is highly robust and easy to understand. Laravel offers a set of advanced functionalities which also incorporates the basic features of PHP frameworks like CodeIgniter. 

When it comes to passwords, Laravel hashes its password using Bcrypt to make it secure. 

This way, you can neither decrypt it without knowing the correct password nor type the password directly into the database to reset a user’s password.

Laravel has the ‘users’ table in the database to store the user credentials like email and password.

To do so, you need to reset the password for a Laravel user from the database. 

In this short guide, we will understand these steps: 

1. First, log in to your cPanel account. 

2. Go to the Terminal section and access your folder via SSH. 

3. Once you are inside the folder, type in the below command to open a different console. 

[user@abc106 public_html]$ php artisan tinker

Try Our Laravel Hosting To Scale Your Business.!

4. You will then view a console that starts with >>>

5. And type in the command:

user@abc106 public_html]$ echo Hash::make(‘enter-your-new-plain-text-password-here’)

Replace your new plain text password here with the main password you want to use. 

Note: This will be in plain text, not in the hashed format. 

6. Then, you will get to see the output as shown below:


7. After you have the password, copy and paste it under the password field in the user’s table. 

And that’s it! 

You can now log in to your account with the username and the updated password, as shown above. 

Special Offer!
For our Knowledge Base visitors only
Get 10% OFF! on Premium Hosting
Offer Valid till:
Claim Your Discount
No thanks, I'll pass
Note: Copy the coupon code and apply it on checkout.