laravel query builder select variable value as field code example
Example 1: wherein laravel
DB::table('user')->whereIn('id', [100,200])->get();
Example 2: laravel db::query update
DB::table('user')->where('email', $userEmail)->update(array('member_type' => $plan));