return User::create([
'role_id' => 2,
'email' => $data['email'],
'username' => $data['email'],
'password' => Hash::make($data['password']),
]);
}
I have this code in registercontroller.php but when the user registers he register with role id 10 why is that?
I think your role_id might be on auto_increment and that is making the problem
Обсуждают сегодня