Level 75
Can you see the difference?
Model::where('artist_token', $token)->update([
'artist_token' => '000',
'account_token' => '000'
]);
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Here is my query
Model::where('artist_token', $token)
->update([
['artist_token' => "000"],
['account_token' => "000"]
]
);
And here is the error
SQLSTATE[42S22]: Column not found: 1054 Unknown column '0' in 'field list' (SQL: update `models` set `0` = {"artist_token":"000"}, `1` = {"account_token":"000"},
This query should update "artist_token" and "account_token" to "000" according to the docs.
Can you see the difference?
Model::where('artist_token', $token)->update([
'artist_token' => '000',
'account_token' => '000'
]);
Please or to participate in this conversation.