$ ResetPassUsers: where (& #039; username & #039;, & #039; & #039;, $ _ POST [& #039; userName & #039;])-& amp; gt; update (array (& #039; password & #039; & amp; gt; md5 ($ _ POST [& #039; pwd1 & #039;]), & #039; resetTime & #039; & amp; gt; time ())); the preceding statement succeeds. $ resetPassUse performs the update operation.
$ ResetPass = Users: where ('username', '=', $ _ POST ['username']) -> update (array ('Password' => md5 ($ _ POST ['pwd1 ']), 'resettime' => time ()));
The preceding statement is successful.
$ ResetPass = Users: where ('username', '=', $ _ POST ['username']) -> update (array ('Password' => md5 ($ _ POST ['pwd1 ']);
The preceding statement fails.
Tutorial
Reply content:
When performing the update operation
$ ResetPass = Users: where ('username', '=', $ _ POST ['username']) -> update (array ('Password' => md5 ($ _ POST ['pwd1 ']), 'resettime' => time ()));
The preceding statement is successful.
$ ResetPass = Users: where ('username', '=', $ _ POST ['username']) -> update (array ('Password' => md5 ($ _ POST ['pwd1 ']);
The preceding statement fails.
Tutorial
The difference is not inresetTime
Field. Does your user table have this field?
Add this line in Users modal.
public $timestamps = false;
This allows laravel to disable the automatic maintenance time field.