[英]Laravel 5.4 - 'updateOrCreate' method. Check If record was 'updated' or 'created'
[英]Laravel 5.4 updated syntax
嗨,大家有問題....
Call to undefined method Illuminate\Database\Query\Builder::udpate()
這是我的更新代碼......
DB::table('gpl_team')->where('id', $idteam)->udpate(['team_logo' => $logo, 'team_name' => $name, 'team_country' => $country, 'updated_at' => $updated_at]);
它的更新而不是udpate()拼寫錯誤
DB::table('gpl_team')->where('id', $idteam)->update(['team_logo' => $logo, 'team_name' => $name, 'team_country' => $country, 'updated_at' => $updated_at]);
嘗試這個我認為它應該是工作
DB::table('gpl_team')->whereId($idteam)->update(['team_logo' => $logo, 'team_name' => $name, 'team_country' => $country, 'updated_at' => $updated_at]);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.