Monday, March 13, 2017

How to display query without executing it with eloquent

I want to display a query without executing it using Eloquent. I want to write something like:

\DB::table('my_table')->insertOrUpdate(['a' => 'b'], ['c' => 'd']);

It's a production action so I am a bit stressed about running it directly. Is there any way to display it instead of running it?



via rap-2-h

Advertisement