المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : لارافيل Laravel كيفية تغيير باسورد الادمن Change admin password - hash type bcrypt



Rise Company
10-12-2023, 22:22
​
لارافيل Laravel كيفية تغيير باسورد الادمن Change admin password - hash type bcrypt
How to create a laravel hashed password
How to reset password for admin with different table in laravel
Default hash type of passwords in Laravel

https://youtu.be/EjB5O2C4iaU?si=oJx3Fq3EWpmM7t66

موقع توليد باسورد من نوع bcrypt

https://bcrypt-generator.com/

ومن داخل قاعدة البينات لاتختار تشفير اجعله فارغ وليس MD5

طريقة اخري

Change User’s Password in Laravel Using Route
The other way of changing a password is through the route. However, it is not recommended. I am just writing about it as this is also the option to update the password. In the route’s callback function, use the same code we used above in the Tinker.


Let’s declare a route changepassword and pass the code to the callback function as shown below.



Route::get('changepassword', function() {
$user = App\Models\User::where('email', '[email protected]')->first();
$user->password = Hash::make('123456');
$user->save();

echo 'Password changed successfully.';
});



Now, run the URL YOUR_DOMAIN_URL/changepassword in the browser. It will call the route and change the user’s password. The developer must remove this route once the password is changed.


المرجع:
https://artisansweb.net/how-to-change-users-password-in-laravel/