6 months ago

How to access DB as a class instance?

Posted 6 months ago by bobg

I would like to programmatically build up a where clause, but DB as a facade doesn't allow for it. How can I do something like this:

$db = new DB;
if ($something) {
    $db->whereIn('field', ['a','b']);

Please sign in or create an account to participate in this conversation.