My Web App uses Laravel & MySQL but for my tests I am using SQLite in memory.
This is my code that I use in my Controller:
$opportunities = DB::table('opportunities')
->whereRaw('JSON_CONTAINS(businesses, \'"' . $business . '"\')')
->get();
When testing this throws an exception because of how SQLite doesn't have a JSON_CONTAINS function. How can I get around this so that my tests pass and I don't have to make any massive changes to the structure? Does SQLite have a function for this or something along these lines?
Thanks