public function scopeInIntegerSlot(Builder $query) { return $query->whereRaw(sprintf('%s.slot REGEXP \'^[[:digit:]]+$\'', $query->getQuery()->from)); }