Giter VIP home page Giter VIP logo

nova-4-google-map's Introduction

Latest Stable Version License Total Downloads

Nova Google Map With Autocomplete Field Package

This field allows you to work with Google Places API to autocomplete and Google Map on user input (latitude and longitude).

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require ghanem/google-map

Now publish config and localization files:

php artisan vendor:publish --provider="Ghanem\GoogleMap\FieldServiceProvider"

Create an app and enable Places API and create credentials to get your API key https://console.developers.google.com

Add the below to your .env file

GMAPS_API_KEY=############################

Usage

Add the use declaration to your resource and use the fields:

use Ghanem\GoogleMap\GHMap;

GHMap::make('Map'), // Google Map with address picker

Image of character counter

Customize Fields

Add custom latitude, longitude and zoom values for starting point

GHMap::make('Map')
    ->latitude('latitude_field_name')
    ->longitude('longitude_field_name')
    ->zoom('zoom'),

Hide latitude and longitude field

GHMap::make('Map')
    ->hideLatitude()
    ->hideLongitude(),

You can add any nova basic methods to fileds (Showing / Hiding, Validation ... ).

Sponsor

๐Ÿ’š๏ธ Become a Sponsor

nova-4-google-map's People

Contributors

abdullahghanem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nova-4-google-map's Issues

Installation failed, composer.json version require issue

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires ghanem/google-map * -> satisfiable by ghanem/google-map[dev-main, v1.0, 9999999-dev].
- ghanem/google-map[dev-main, v1.0] require laravel/nova ^4.0 -> found laravel/nova[3.32.0] but it does not match the constraint.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.