davidpiesse / nova-map

Laravel Nova Map Field
114 stars 29 forks source link

Map not found #25

Closed xoco70 closed 3 years ago

xoco70 commented 3 years ago

Hi,

I'm trying to use your plugin.

I can succesfully install it:

➜ l6-nova git:(master) ✗ composer require grimzy/laravel-mysql-spatial

Using version ^3.0 for grimzy/laravel-mysql-spatial
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 4 installs, 0 updates, 0 removals
  - Installing jmikola/geojson (1.0.2): Loading from cache
  - Installing geo-io/interface (v1.0.1): Loading from cache
  - Installing geo-io/wkb-parser (v1.0.1): Loading from cache
  - Installing grimzy/laravel-mysql-spatial (3.0.0): Loading from cache
Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead.
Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead.
Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead.
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: anaseqal/nova-import
Discovered Package: coderello/laravel-nova-lang
Discovered Package: coroowicaksono/chart-js-integration
Discovered Package: ebess/advanced-nova-media-library
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: genealabs/nova-map-marker-field
Discovered Package: gregoriohc/laravel-nova-theme-responsive
Discovered Package: grimzy/laravel-mysql-spatial
Discovered Package: intervention/image
Discovered Package: kabbouchi/nova-impersonate
Discovered Package: kpolicar/nova-date-range
Discovered Package: lab404/laravel-impersonate
Discovered Package: laravel/nova
Discovered Package: laravel/tinker
Discovered Package: maatwebsite/excel
Discovered Package: maatwebsite/laravel-nova-excel
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Discovered Package: otrsw/leaflet-map
Discovered Package: spatie/laravel-medialibrary
Discovered Package: tray-labs/laravel-influxdb
Discovered Package: users/total
Package manifest generated successfully.

Then in my model , I add:

use Grimzy\LaravelMysqlSpatial\Eloquent\SpatialTrait;

and

protected $spatialFields = [
        'prms_in_map',
    ];

but when I want to insert field, I cannot use Map:: facade, it says class not found.

I checked the vendor folder, and couldn't find any Map definition

How should I implement it ?

I'm using Nova 2.x with Laravel 6

Any idea how should I do it ?

xoco70 commented 3 years ago

I think I found out the problem.

composer require davidpiesse/nova-map

You should include it in the readme it's the most important line!

it comes on the packagist site, but not in github

davidpiesse commented 3 years ago

Thanks. I'll look to add that to the readme as well.