@xgrave Eloquent should work with an in-memory database just fine. I personally use them in my tests.
Jul 22, 2020
2
Level 2
How to drop database name in Eloquent Model Query?
Hey all, I am cant get my eloquent queries to work with in memory sqlite unit tests, how can I drop the db name from all model queries?
For Example Item::whereId(1)->toSql() returns "select * from ":memory:"."items" where "id" = ?"
I want to drop the ":memory:". part because it breaks the query.
DB::table('items')->whereId(1)->toSql() returns "select * from "items" where "id" = ?" and works perfectly fine, but I dont want to rewrite every eloquent query into a DB::table one
Please or to participate in this conversation.