From Laravel Docs:
The updateOrInsert method will attempt to locate a matching database record using the first argument's column and value pairs.
DB::table('users')
->updateOrInsert(
['email' => 'john@example.com', 'name' => 'John'],
['votes' => '2']
);
Would it be possible instead of checking both records to be true at the same time such as 'email' => 'john@example.com' and 'name' => 'John' we check only one such 'email' => 'john@example.com' OR 'name' => 'John'
Something like this which is not possible (or i don't know how)
DB::table('users')
->updateOrInsert(
['email' => 'john@example.com','OR', 'name' => 'John'],
['votes' => '2']
);
Is this something that can be done some how?