yes you can. a good way to test is tinker, try everything again and again.
Mar 30, 2018
3
Level 1
How to convert Query Builder to Eloquent?
Hi, I have been searching for a list of all eloquent queries but no luck. So Can I just convert Query Builder Queries into Eloquent? For example.
Query Builder : DB::table('users')->where('name', 'John')->value('email')
Eloquent : Users::where('name', 'John')->value('email')
Will it work for every DB Query? Thanks for your answers.
Please or to participate in this conversation.