0

I'm setting up a map, and want to display the coordinates. What do I need to do?

Blade

@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

Model

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use TCG\Voyager\Traits\Spatial;

class Argan extends Model
{
    use Spatial;

    protected $spatial = ['point'];
}
Karl Hill
  • 12,937
  • 5
  • 58
  • 95
izail
  • 76
  • 2
  • 7
  • This probably means that somewhere on your blade file you are trying to echo out an array instead of a string. Make sure that all of your data passed to `{{ }}` are a string. – Raphael Cunha Mar 30 '19 at 00:27
  • i'm trying to echo a coordinates stored in the db by lat and log – izail Mar 31 '19 at 20:00

0 Answers0