Execute function
<code>public function registerStore(Requests\RegisterRequest $request){ $user=User::user(); $res=$user->update($request->all()); return redirect('/'); }</code>
User.php
<code> 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', ]; </code>
It is a very ordinary update, the user data is already available.
6.24 update, I set the extra value of the crated_at field in the user table to null, and it seems to be fine. Before, it was on update CURRENT_TIMESTAMP
Execute function
<code>public function registerStore(Requests\RegisterRequest $request){ $user=User::user(); $res=$user->update($request->all()); return redirect('/'); }</code>
User.php
<code> 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', ]; </code>
It is a very ordinary update, the user data is already available.
6.24 update, I set the extra value of the crated_at field in the user table to null, and it seems to be fine. Before, it was on update CURRENT_TIMESTAMP
It seems that other people have encountered this problem: https://github.com/laravel/framework/issues/11518
Try creating migration
when
<code class="php">$table->timestamp('created_at')->useCurrent(); $table->timestamp('updated_at')->useCurrent();</code>
or
<code class="php">$table->nullableTimestamps();</code>