i am trying to show google map in Voyager admin panel i use bread but i get error :
Invalid argument supplied for foreach() (View: path\vendor\tcg\voyager\resources\views\formfields\coordinates.blade.php) (View: paht\vendor\tcg\voyager\resources\views\formfields\coordinates.blade.php)
any solution ?
You should add trait Spatial in your model
use TCG\Voyager\Traits\Spatial;
and initialize the field with coordinates
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;
}