2016-08-16 66 views
0
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) 

我的註銷代碼在這裏:SQLSTATE [42S22]:列未找到:未知列 '的updated_at' 在 '字段列表'(SQL:更新`user_tbl`設置`remember_token` = twR4

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

回答

0

您需要添加updated_at列到你的SQL表user_tbl。如果你不希望使用它,你還可以在模型中關閉timestamps

默認情況下,雄辯預計created_atupdated_at列存在於您的表上。如果你不希望有這些列由口才自動管理,在模型中的$timestamps屬性設置爲false

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

+0

感謝哥們....現在它的工作,,,,,,沒有錯誤 – palash3593

相關問題