Skip to content

TypiCMS/Places

Repository files navigation

Places

Manage places and show them on a map.

Installation

  1. Require the package using composer:
composer require typicms/places
  1. Add the service provider in your config/app.php file:
'providers' => [
    /*
     * TypiCMS Modules Service Providers.
     */
    TypiCMS\Modules\Places\Providers\ModuleServiceProvider::class,
];
  1. Publish files from this module to your project, run:
php artisan vendor:publish --provider="TypiCMS\Modules\Places\Providers\ModuleServiceProvider"
  1. Run the migration:
php artisan migrate
  1. Set a Google Maps API key in your .env file. See Google Maps Platform.

  2. Install @googlemaps/markerclusterer and :

bun add @googlemaps/markerclusterer --dev
bun add @types/google.maps --dev
  1. Uncomment the following lines in /resources/js/public.js:
import initMap from './public/map';

window.initMap = initMap;
  1. Add this line to the /resources/scss/public.scss file:
@import 'public/map';
  1. Run bun run dev to compile the assets.

  2. Connect to the admin panel, add some places, create a page linked to the module Places and visit this page to see the places on a map.

This module is part of TypiCMS, a multilingual CMS based on the Laravel framework.