Laravel 5.4 field doesn't have a default value

后端 未结 7 787
执念已碎
执念已碎 2020-12-14 06:37

I am having this error and none of the googled result i checked is similar to my problem.

I have an application with class Deal, User, and Matches

A deal has

相关标签:
7条回答
  • 2020-12-14 07:39

    Alexey Mezenin's Answer is correct and a good one.

    Another way i used around it, for those who want to maintain the guarded empty array is to create a new Match object and put in the attributes and save.

                $match->user_id = $id;
                $match->deal_id = $deal->id;
                $match->matched_on = $match->freshTimestamp();
                $match->save();
    
    0 讨论(0)
提交回复
热议问题