gpt4 book ai didi

php - SQLSTATE[42S22] : Column not found:Unknown column 'updated_at' in 'field list' (SQL: update `user_tbl` set `remember_token` = twR4

转载 作者:行者123 更新时间:2023-12-04 03:19:58 26 4
gpt4 key购买 nike

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updated_at' in 'field list' (SQL: update `user_tbl` set `remember_token` = twR4isCzOsVYw4ODV87rC5hdLwAkhHuB8REorcfZe8uA3jlUNISHzT34oZlc, `updated_at` = 2016-08-16 12:40:05 where `id` = 1)

我的注销代码在这里:

public function logout()
{
Auth::logout();
return redirect()->intended('login');
}

最佳答案

您需要将updated_at 列添加到您的SQL 表user_tbl 中。如果您不想使用它。您还可以在模型中关闭时间戳

By default, Eloquent expects created_at and updated_at columns to exist on your tables. If you do not wish to have these columns automatically managed by Eloquent, set the $timestamps property on your model to false

https://laravel.com/docs/5.2/eloquent

关于php - SQLSTATE[42S22] : Column not found:Unknown column 'updated_at' in 'field list' (SQL: update `user_tbl` set `remember_token` = twR4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38975504/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com