Level 75
DB::table('currencies')->select('shortcode')->whereNull('spot_price')->get();
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello guys. I have created the following db query using the Laravel DB Facade :
DB::table('currencies')->whereNull('spot_price')->value('shortcode');
The problem with the query above is that I only get one value (for example 'ABC') and I have two records in my table that match these specific criteria. Any ideas on how to get multiple values back?
Thank you very much!
DB::table('currencies')->select('shortcode')->whereNull('spot_price')->get();
Please or to participate in this conversation.