Greetings community I have a doubt and I do not know how it is resolved ...
How well we know if I wanted to make a query that had an OR clause in SQl would be something like this:
Select * tabla where campoA='1' || campoA='2'
The issue is that I'm doing it in Laravel 5.2 using eloquent and according to the documentation I should use the orWhere.
$variable=Tabla::orderBy('id') ->where('campoA','=','1') ->orWhere('campoA','=','2') ->get();
The problem is that I've done this and what I get is not the expected result, it gives me another kind of result, so I do not know what I'm doing wrong, since I've been guided by the documentation, of being wrong done, what is the correct way to use this option?
I hope you can help me.