我正在设置地图,并希望显示坐标。我该怎么办?
刀片
@foreach($myArgans as $argan)
<div class="col-lg-12">
<h1>{{ $argan->titre }}</h2>
<img class="card-img-top" src="{{ asset('storage/'.$argan->image) }}">
<div style="text-align: justify">
{{ $argan->body }}
</div>
<div>
{{ $argan->getCoordinates() }}
</div>
</div>
@endforeach
模型
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use TCG\Voyager\Traits\Spatial;
class Argan extends Model
{
use Spatial;
protected $spatial = ['point'];
}