creation of password in the standard

Asked

Viewed 277 times

0

Good morning to all!! How do I create a password in the style of passwords created by Windows? for very particular reasons I need to use the Laravel users table, but it is my parallel application that will create these new users, however, I want the Laravel also access these users. Thank you for your attention!

  • Does your parallel application also use Laravel? Could you talk more about these particular reasons and explain your context better?

1 answer

0


The hashing of passwords in Laravel is configured in config/hashing.php and, by default, is configured to use the algorithm bcrypt.

To create a password using the hash function, you can use the following:

use Illuminate\Support\Facades\Hash;

$senha = Hash::make('exemplo123');

Another possibility, if you want to use the same bcrypt algorithm, is to use the following Laravel helper:

$senha = bcrypt('exemplo123');

You can consult the Laravel documentation on hashing to understand more.

  • worked out!! thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.