skip to Main Content

I use Hash::make($req->pass); to login in Laravel. Now I forgot the password. Can I change the password by editing PHPMyAdmin? Is there any PHPMyadmin function to change the Bcrypt?

For eg. To change the password stored in MD5, I can change it by using MD5 function. And it works fine for all WordPress logins.

Thanks in Advance

2

Answers


  1. One way to change the password manually is to get the value from

    $pw=Hash::make('yourpassword');
    

    to a variable and copy that value into users table password field.

    Login or Signup to reply.
  2. I would use Tinker to achieve this:

    php artisan tinker
    
    $user = App/Models/User()::find(/* user_id */);
    
    $user->password = Hash::make('your new password here');
    
    $user->save();
    
    // You should receive a "true" if the update is successful. 
    // This can all be done via the command line.
    

    You can also (for the sake of answering your question) just output the password from the route file:

    Route::get('generate-password', function () {
      return Hash::make('your new password');
    })
    

    visit the ‘/generate-password’ url, copy that password, then paste it into PHPMyAdmin

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search