original_string: public function scopeFor($query, $table)
      {
          if ($table instanceof Model) {
              $table = $table->getTable();
          }
  
          return $query->where('table_name', $table);
      }
code: public function scopeFor($query, $table)
      {
          if ($table instanceof Model) {
              $table = $table->getTable();
          }
  
          return $query->where('table_name', $table);
      }
code_tokens: public function scopeFor ( $ query , $ table ) { if ( $ table instanceof Model ) { $ table = $ table -> getTable ( ) ; } return $ query -> where ( 'table_name' , $ table ) ; }
docstring: Query scope for.
  
  @link https://laravel.com/docs/eloquent#local-scopes
  
  @param \Illuminate\Database\Eloquent\Builder      $query
  @param \Illuminate\Database\Eloquent\Model|string $table
  
  @return \Illuminate\Database\Eloquent\Builder
docstring_tokens: Query scope for .