How do I get this syntax in Laravel?
SELECT *
FROM myTable
WHERE myColumn = 'A'
AND myColumn = 'B';
I know this syntax in Laravel:
DB::table('myTable')->where('myColumn', 'A');
And I tried something like this:
DB::table('myTable')->where('myColumn', 'A' AND 'B');
or
DB::table('myTable')->where('myColumn', 'A' AND 'myColumn' 'B');
but nothing works
So how can I use the AND operator in Laravel? Or is this not possible?
Thank You!
I got it now:
if(!empty($request->get('typ'))){
$angebots->whereIn('typ', [$typ, 'Jeden']);
}
myColumn?!empty($request->get('typ')try to use$request->has('typ')