with array query in laravel code example
Example 1: laravel wher in
$users = DB::table('users')
->whereIn('id', [1, 2, 3])
->get();
Example 2: laravel query builder select first
$user = DB::table('users')->where('name', 'John')->first();
var_dump($user->name);
Example 3: return query builder result to array
$result = DB::table('user')->where('name',=,'Jhon')->get();