We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1c0ad2 commit b9f4d31Copy full SHA for b9f4d31
app/Actions/Fortify/CreateNewUser.php
@@ -42,12 +42,17 @@ public function create(array $input): User
42
'password' => $this->passwordRules(),
43
])->validate();
44
45
- return User::create([
+ /** @var User $user */
46
+ $user = User::create([
47
'name' => $input['name'],
48
'email' => $input['email'],
49
'username' => Str::lower($input['username']),
50
'password' => Hash::make($input['password']),
51
'opt_in' => isset($input['opt_in']),
52
]);
53
+
54
+ $user->assignRole('user');
55
56
+ return $user;
57
}
58
0 commit comments