Execute 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', ];
is a very common update, the user data already has.
6.24 Update, I say the extra value of the Crated_at field in the user table is set to NULL, which seems to be good, before the on update current_timestamp
Reply content:
Execute 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', ];
is a very common update, the user data already has.
6.24 Update, I say the extra value of the Crated_at field in the user table is set to NULL, which seems to be good, before the on update current_timestamp
It seems like someone else has come across this problem: https://github.com/laravel/framework/issues/11518
Try to look at the establishment migration
$table->timestamp('created_at')->useCurrent();$table->timestamp('updated_at')->useCurrent();
Or
$table->nullableTimestamps();