Call to a member function format() on string 乍回事?
$student= Student::find(1006); $student->name = 'kitty'; $student->age=18; $bool= ?$student->save(); var_dump($bool); "Call to a member function format() on string" 更新不了數(shù)據(jù)怎么回事?
$student= Student::find(1006); $student->name = 'kitty'; $student->age=18; $bool= ?$student->save(); var_dump($bool); "Call to a member function format() on string" 更新不了數(shù)據(jù)怎么回事?
2018-01-24
舉報(bào)
2019-08-02
在模型里加上這個(gè)就好了
2018-02-26
需要將模型中asDateTime()
這個(gè)方法屏蔽了
2018-01-25
是否開(kāi)了 public $timestamps = true; 自動(dòng)更新時(shí)間的屬性,如果開(kāi)了,檢查一下數(shù)據(jù)庫(kù)中的created_at和updated_at,看提示應(yīng)該是格式不符? "試圖在字符串成員調(diào)用format()方法"