MODEL->save() error

Posted 1 year ago by TomyLimon

Hi. I have strange situation. I have model Document and problem is

$doc = Document::find(2); $doc->save();

as result I'm getting error

SQLSTATE[42S22]: Column not found: 1054 Unknown column '0' in 'field list' (SQL: update documents set 0 = {"id":4,"document_id":2,"unit_id":107,"unit_name":"Balons no komp. materi\u0101la, 6,8 l / 300bar, 30 gadi, ar AZA ventili ar av\u0101rijas nopl\u016bdes

Problem is field list in SQL is taken from different table. I can't understand how/whie....

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.