在Laravel Voyager管理面板中渲染Google Map

时间:2017-10-24 14:58:00

标签: php laravel voyager

我想在Voyager管理面板中显示谷歌地图我使用面包但我得到错误:

year

任何解决方案?

1 个答案:

答案 0 :(得分:4)

您应该在模型中添加特质空间

使用TCG \ Voyager \ Traits \ Spatial;

并使用坐标

初始化字段
use TCG\Voyager\Traits\Spatial;

class Product extends Model
{
  use Spatial;
  protected $spatial = ['coordinates']; //here is going your field name; should be the point type;
}
相关问题