Is it mandatory to use the DB::raw function when starting a query, and you are not using the free query constructor in Laravel?
eg.
$result = DB::select("SELECT * FROM users"); $result2 = DB::select(DB::raw("SELECT * FROM users"));
I get the same result in both cases. So why use DB::raw ?
source share