original_string: protected function newQueryForCollectionRestoration(array $ids)
      {
          if (! Str::contains($ids[0], ':')) {
              return parent::newQueryForRestoration($ids);
          }
  
          $query = $this->newQueryWithoutScopes();
  
          foreach ($ids as $id) {
              $segments = explode(':', $id);
  
              $query->orWhere(function ($query) use ($segments) {
                  return $query->where($segments[0], $segments[1])
                      ->where($segments[2], $segments[3]);
              });
          }
  
          return $query;
      }
code: protected function newQueryForCollectionRestoration(array $ids)
      {
          if (! Str::contains($ids[0], ':')) {
              return parent::newQueryForRestoration($ids);
          }
  
          $query = $this->newQueryWithoutScopes();
  
          foreach ($ids as $id) {
              $segments = explode(':', $id);
  
              $query->orWhere(function ($query) use ($segments) {
                  return $query->where($segments[0], $segments[1])
                      ->where($segments[2], $segments[3]);
              });
          }
  
          return $query;
      }
code_tokens: protected function newQueryForCollectionRestoration ( array $ ids ) { if ( ! Str :: contains ( $ ids [ 0 ] , ':' ) ) { return parent :: newQueryForRestoration ( $ ids ) ; } $ query = $ this -> newQueryWithoutScopes ( ) ; foreach ( $ ids as $ id ) { $ segments = explode ( ':' , $ id ) ; $ query -> orWhere ( function ( $ query ) use ( $ segments ) { return $ query -> where ( $ segments [ 0 ] , $ segments [ 1 ] ) -> where ( $ segments [ 2 ] , $ segments [ 3 ] ) ; } ) ; } return $ query ; }
docstring: Get a new query to restore multiple models by their queueable IDs.
  
  @param  array|int  $ids
  @return \Illuminate\Database\Eloquent\Builder
docstring_tokens: Get a new query to restore multiple models by their queueable IDs .