Answers for "fetch Raw Queries in Laravel"

PHP
0

show query in laravel

Use the toSql() method on a QueryBuilder instance.

DB::table('users')->toSql()
Posted by: Guest on January-18-2021
1

raw queries in laravel

DB::statement('UPDATE users SET role_id = 1 WHERE role_id IS NULL AND YEAR(created_at) > 2020');
Posted by: Guest on August-11-2020

Browse Popular Code Answers by Language