Skip to content

a1lan1/postgis-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PostGIS Map

This is a PostGIS demo web application. The development environment is fully containerized using Docker and Laravel Sail.

Key Technologies

  • clickbar/laravel-magellan: This package provides access to PostGIS functionality within Laravel. It allows using PostGIS data types in migrations and provides Builder functions to access PostGIS functions, avoiding raw SQL.

Getting Started

  1. Prepare the environment file.

    composer setup
  2. Build and start the application containers.

    sail build
    sail up -d
  3. Connect to the database.

    sail exec pgsql psql -U ${DB_USERNAME} -d ${DB_DATABASE}

    or

    sail exec pgsql psql -U sail -d postgis_demo
  4. Activate PostGIS.

    CREATE EXTENSION postgis;
  5. Run migrations and seed data.

    sail artisan migrate:fresh --seed
  6. Start the frontend development server.

    sail yarn dev

Development Workflow

IDE Helper

sail artisan ide-helper:generate
sail artisan ide-helper:models -RW
sail artisan ide-helper:meta

Code Quality & Linting

  • Pint: Fix code style issues.
    sail pint
  • PHPStan: Run static analysis to find potential bugs.
    sail phpstan analyse
  • ESLint & Prettier: Lint and format frontend code.
    sail yarn lint
    sail yarn format

Testing

sail up -d
sail shell
make test

About

PostGIS map

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors