Skip to content

Commit 3c5e2de

Browse files
authored
More flexible password setting
This is allow it to work be it bcrypt or argon2
1 parent 7f52ad8 commit 3c5e2de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/argon-stubs/app/Http/Controllers/ProfileController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use App\Http\Requests\ProfileRequest;
66
use App\Http\Requests\PasswordRequest;
7+
use Illuminate\Support\Facades\Hash;
78

89
class ProfileController extends Controller
910
{
@@ -38,7 +39,7 @@ public function update(ProfileRequest $request)
3839
*/
3940
public function password(PasswordRequest $request)
4041
{
41-
auth()->user()->update(['password' => bcrypt($request->get('password'))]);
42+
auth()->user()->update(['password' => Hash::make($request->get('password'))]);
4243

4344
return back()->withPasswordStatus(__('Password successfully updated.'));
4445
}

0 commit comments

Comments
 (0)