General error: 1 no such column: counts (SQL: insert into "ar_content_read_counts" ("content_id", "admin_id", "counts", "updated_at", "created_at") values (ar_movie_type, 1, counts + 1, 2022-09-13 16:39:17, 2022-09-13 16:39:17)) {"exception":"[object] (Illuminate\\Database\\QueryException(code: HY000): SQLSTATE[HY000]: General error: 1 no such column: counts (SQL: insert into \"ar_content_read_counts\" (\"content_id\", \"admin_id\", \"counts\", \"updated_at\", \"created_at\") values (ar_movie_type, 1, counts + 1, 2022-09-13 16:39:17, 2022-09-13 16:39:17))
I am running phpunit test return this error .It is Ok in Postman . I used this code
$this->connection()->updateOrCreate([
'content_id' => $contentId
], ['counts' => DB::raw('counts + 1')]);
enter code here