This is a PostGIS demo web application. The development environment is fully containerized using Docker and Laravel Sail.
- 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.
-
Prepare the environment file.
composer setup
-
Build and start the application containers.
sail build sail up -d
-
Connect to the database.
sail exec pgsql psql -U ${DB_USERNAME} -d ${DB_DATABASE}
or
sail exec pgsql psql -U sail -d postgis_demo -
Activate PostGIS.
CREATE EXTENSION postgis; -
Run migrations and seed data.
sail artisan migrate:fresh --seed
-
Start the frontend development server.
sail yarn dev
sail artisan ide-helper:generate
sail artisan ide-helper:models -RW
sail artisan ide-helper:meta- 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
sail up -d
sail shell
make test