Laravel model Trailing Data when save the model
问题 I have some code like this $editStuState = StuAtt::where('studentId' , '=' , $id)->first(); $editStuState -> leave +=1; $editStuState -> present = $editStuState -> present-1; $editStuState->update(); //OR $editStuState->save(); return 'this is good'; I can't save or Update my data, when I remove Update and Save related line it can print text. this is the dd($editStuState) data StuAtt {#382 ▼ #table: "stu_attendance" #connection: "mysql" #primaryKey: "id" #keyType: "int" +incrementing: true