helpers refactoring

This commit is contained in:
Peter Papp
2021-03-31 08:27:28 +02:00
parent 6ac6528243
commit a8fa3694be
30 changed files with 85 additions and 211 deletions
+1 -2
View File
@@ -5,7 +5,6 @@ namespace App\Actions\Fortify;
use App\Models\Setting;
use App\Models\User;
use App\Models\UserSettings;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Laravel\Fortify\Contracts\CreatesNewUsers;
@@ -44,7 +43,7 @@ class CreateNewUser implements CreatesNewUsers
$user = User::create([
'email' => $input['email'],
'password' => Hash::make($input['password']),
'password' => bcrypt($input['password']),
]);
UserSettings::unguard();
+1 -2
View File
@@ -2,7 +2,6 @@
namespace App\Actions\Fortify;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Laravel\Fortify\Contracts\ResetsUserPasswords;
@@ -24,7 +23,7 @@ class ResetUserPassword implements ResetsUserPasswords
])->validate();
$user->forceFill([
'password' => Hash::make($input['password']),
'password' => bcrypt($input['password']),
])->save();
}
}
+1 -1
View File
@@ -29,7 +29,7 @@ class UpdateUserPassword implements UpdatesUserPasswords
})->validateWithBag('updatePassword');
$user->forceFill([
'password' => Hash::make($input['password']),
'password' => bcrypt($input['password']),
])->save();
}
}