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}