Please Guys, help me for edit this default command??
i am want add some code again like a school name, or address
SQLSTATE[HY000]: General error: 1364 Field 'sektor' doesn't have a default value (SQL: insert into users (name, email, password, updated_at, created_at) values (Teguh Rijanandi, teguhrijanandi02@gmail.com, $2y$10$hqzIZLq3PEK/ndiS7dCDluunnuTUKqEC9hrKBafVwOXkYjdHqF06O, 2018-06-06 15:15:36, 2018-06-06 15:15:36))
The problem is wherever you are attempting to create the User, you are not defining the sektor value, and in your migration for users table, there is no default value specified (in the event that a value wasn't provided).
If you share your code which creates the user, we can show you how to work around this issue
I just want edit default code "insert into users (name, email, password, updated_at, created_at)" to insert into users (name, email, school,address password, updated_at, created_at) ??
In what context; you are not being clear about what you are trying to do or how?
Are you using the built-in Authentication system? You would need to modify your RegisterController:
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
'sektor' => $data['sektor'] // do you have the `sektor` in the request?
]);
}
I have not idea what you have done/ are doing... why not make the remember_token field nullable as well since that is the default implementation of the rememberToken() schema builder method - equivalent to