In my Laravel application, I need to check if there is a specific record in 20 columns in a table. I have searched for this answer but only found a way to check if it exists in a specific column but I need to check all columns and I was wondering if there is a way to do this without a loop, For example:
DB::table('cart')->where($fileId->id)->exists();
Assume
$field->id
is the search term. You can try