protected function resolveTableName($table)
    {
        if (! Str::contains($table, '\\') || ! class_exists($table)) {
            return $table;
        }

        $model = new $table;

        if (! $model instanceof Model) {
            return $table;
        }

        if ($model instanceof Pivot) {
            $this->using($table);
        }

        return $model->getTable();
    }
protected function resolveTableName($table)
    {
        if (! Str::contains($table, '\\') || ! class_exists($table)) {
            return $table;
        }

        $model = new $table;

        if (! $model instanceof Model) {
            return $table;
        }

        if ($model instanceof Pivot) {
            $this->using($table);
        }

        return $model->getTable();
    }
protected function resolveTableName ( $ table ) { if ( ! Str :: contains ( $ table , '\\' ) || ! class_exists ( $ table ) ) { return $ table ; } $ model = new $ table ; if ( ! $ model instanceof Model ) { return $ table ; } if ( $ model instanceof Pivot ) { $ this -> using ( $ table ) ; } return $ model -> getTable ( ) ; }
Attempt to resolve the intermediate table name from the given string.

@param  string  $table
@return string
Attempt to resolve the intermediate table name from the given string .