Easy query that should not give null
$product = Product::where('serial', $serial)->orWhere('mfg_serial', $serial)->first();
why this query yields null where I have the serial and I am sure of that
@lifesound if you have it - it should works. It means either you have incorrect value in $serial OR you DO NOT have record with this serial
Use any db client to check the database directly with the query
select * from products where `serial` = "put_serial_here" or `mfg_serial` = "put_serial_here"
@lifesound so, you mfg_serial is always null. Can you show the row which contains search value?
Please copy the record from the database and post it here. Also please post the result of dd($serial)
removed photo for production purposes
weird it was my SQL problem and after restart it worked
@lifesound sound like some caching issue, you might want to disable it or something might work unexpectedly
after a hard night it was a space problem
there were a little space that’s not trimmed
Please or to participate in this conversation.