Answers for "querybuilder laravel"

PHP
7

laravel wher in

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

laravel query builder select

use Illuminate\Support\Facades\DB;

$users = DB::table('users')
            ->select('name', 'email as user_email')
            ->get();
Posted by: Guest on August-14-2021
1

DB::table('users')->get();

$users = DB::table('users')->get();
Posted by: Guest on October-22-2020
1

laravel query builder

$email = DB::table('users')->where('name', 'John')->value('email');
Posted by: Guest on September-11-2021
2

DB::table('users')->get();

DB::select('SELECT * FROM users WHERE name = ?', array(Input::get('name')));
Posted by: Guest on October-22-2020
0

Laravel query builder toSql

$query = DB::table('table')->whereIn('some_field', [1,2,30]);

$sql = $query->toSql();

$bindings = $query->getBindings();
Posted by: Guest on May-16-2021

Browse Popular Code Answers by Language