Using Coordinates throws out an undefined method getCoordinates()
Call to undefined method Illuminate\Database\Query\Builder::getCoordinates() (View: \vendor\tcg\voyager\resources\views\partials\coordinates-static-image.blade.php) (View: \vendor\tcg\voyager\resources\views\partials\coordinates-static-image.blade.php)
Use a varchar (255) and name it anything and use Coordinates from BREAD
getCoordinates() is defined in the Spatial trait. I don't remember exactly where that gets added, but I believe you have to use a specific field type (likely called Spatial), not just varchar(255)
I tried all spatial types, I think point should be the one to work but it didn't ... they all give the same error
I have same issue
You need to use Spatial Trait
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use TCG\Voyager\Traits\Spatial;
class YouModel extends Model
{
use Spatial;
//
}
I have same issue in voyager admin panel, please help !
In database i have use POINT type on column and the error is the same.
I have set the api key in my config file.
@grzeee, does the model class for your table use the Spacial trait like @Rhymond's comment says?
@fletch3555 thank you for your for patience ;) it is worked.
It worth to describe this bread type in documentation.
Voyager is awesome !
Agreed. Also, the documentation is open for suggestions directly through readme.io, so feel free to suggest changes there.
@Rhymond's comment provides the correct solution. Closing
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Most helpful comment
You need to use Spatial Trait