The execution of the function {code...} User. php {code...} is a common update, and the user data already exists. 6.24 update. it seems that the extra value of the crated_at field in the user table is set to null. the onupdateCURRENT_TIMESTAMP previously executes the function.
public function registerStore(Requests\RegisterRequest $request){ $user=User::user(); $res=$user->update($request->all()); return redirect('/'); }
User. php
protected $fillable = [ 'name', 'email', 'password', 'openid','user_id','truename','tel','card','bank_name','bank_branch' ]; /** * The attributes excluded from the model's JSON form. * * @var array */ protected $hidden = [ 'password', 'remember_token', ];
It is a common update, and user data already exists.
6.24 update. I will talk about setting the extra value of the crated_at field in the user table to null, which seems to be fine. Previously, it was on update CURRENT_TIMESTAMP.
Reply content:
Execute a function
public function registerStore(Requests\RegisterRequest $request){ $user=User::user(); $res=$user->update($request->all()); return redirect('/'); }
User. php
protected $fillable = [ 'name', 'email', 'password', 'openid','user_id','truename','tel','card','bank_name','bank_branch' ]; /** * The attributes excluded from the model's JSON form. * * @var array */ protected $hidden = [ 'password', 'remember_token', ];
It is a common update, and user data already exists.
6.24 update. I will talk about setting the extra value of the crated_at field in the user table to null, which seems to be fine. Previously, it was on update CURRENT_TIMESTAMP.
It seems that someone else has encountered this problem: https://github.com/laravel/framework/issues/11518
ZookeepermigrationTime
$table->timestamp('created_at')->useCurrent();$table->timestamp('updated_at')->useCurrent();
Or
$table->nullableTimestamps();