laravel-mysql-spatial icon indicating copy to clipboard operation
laravel-mysql-spatial copied to clipboard

Call to undefined method Grimzy\LaravelMysqlSpatial\Schema\Grammars\MySqlGrammar::compileColumnExists()

Open eelco2k opened this issue 5 years ago • 3 comments

i'm getting an error when using this code for getting my table column names.

    public function getColumnsNames($table) {
        $connection = DB::connection();
        $connection->getSchemaBuilder();

        $table = $connection->getTablePrefix() . $table;
        $grammar = $connection->getSchemaGrammar();
        $results = $connection->select($grammar->compileColumnExists(), array($connection->getDatabaseName(), $table));

        return $connection->getPostProcessor()->processColumnListing($results);
    }

eelco2k avatar Mar 15 '19 10:03 eelco2k

What's the type of $connection? Grimzy\LaravelMysqlSpatial\MysqlConnection?

grimzy avatar Mar 17 '19 01:03 grimzy

i tried the following:

dd(get_class($connection));

which returns:

"Grimzy\LaravelMysqlSpatial\MysqlConnection"

so yes that is the type

eelco2k avatar Mar 27 '19 11:03 eelco2k

Might be related to https://github.com/grimzy/laravel-mysql-spatial/issues/109.

grimzy avatar Mar 09 '20 03:03 grimzy