Answers for "select all query 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
7

laravel not in query

DB::table(..)->select(..)->whereNotIn('book_price', [100,200])->get();
Posted by: Guest on September-26-2020
7

laravel wher in

$users = DB::table('users')
                    ->whereIn('id', [1, 2, 3])
                    ->get();
Posted by: Guest on April-30-2020
-1

laravel having

$users = DB::table('users')
                ->groupBy('account_id')
                ->having('account_id', '>', 100)
                ->get();
Posted by: Guest on June-18-2020

Browse Popular Code Answers by Language