删除话题时数据库报错 General error: 25 column index out of range??
详细报错内容如下:
There was 1 error:
1) Tests\Feature\CreateThreadsTest::test_a_thread_can_be_deleted
Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 25 column index out of range (SQL: select count(*) as aggregate from "threads" where ("user_id" = 2 and "channel_id" = 1 and "title" = Molestiae neque eveniet ut et omnis. and "body" = Doloremque aperiam quaerat iusto deleniti. Debitis modi non aut delectus sint non eaque. Id libero consequatur quasi quos ex commodi quia. and "updated_at" = 2018-08-07 12:26:22 and "created_at" = 2018-08-07 12:26:22 and "id" = 1 and "channel" = 1))
就是在destroy方法里面的$thread->delete()
引起的报错
推荐文章: