1 DB::table('user')->where('email', $userEmail)->update(array('member_type' => $plan));
2
1use Illuminate\Support\Facades\DB;
2
3$users = DB::table('users')
4 ->select('name', 'email as user_email')
5 ->get();
1$query = DB::table('table')->whereIn('some_field', [1,2,30]);
2
3$sql = $query->toSql();
4
5$bindings = $query->getBindings();
6
1use Illuminate\Database\Eloquent\Builder;
2
3public function scopeFakePersons(Builder $query): Builder
4{
5 return $query->where('is_fake', 1);
6}