I have been trying to update a document using laravel ORM but getting exception stating a unknown column updated_at.
This column is not in database table, and neither have I mentioned in the query.
$foo = ProductMatchUnmatchHistory::where('product_match_unmatches_id', $pmu->id) ->update(['is_latest'=>0]); ProductMatchUnmatchHistory model:
protected $fillable = [ 'product_match_unmatches_id', 'human_verdict', 'ai_result', 'updated_on', 'updated_by', 'is_latest' ]; The table has the same columns as in $fillable array, with additional id primary key.
Here's the exception message:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updated_at' in 'field list' (SQL: update `product_match_unmatch_histories` set `is_latest` = 0, `updated_at` = 2019-11-20 12:20:02 where `product_match_unmatches_id` = 1759) I have no clue from where the updated_at column is added to the query.