8000 GitHub - Javaabu/locations: Location data management: countries, states, cities, atolls and islands, with seedable data for every country and every Maldivian atoll and island, plus views and controllers · GitHub
[go: up one dir, main page]

Skip to content
JavaabuPublic

About

Location data management: countries, states, cities, atolls and islands, with seedable data for every country and every Maldivian atoll and island, plus views and controllers

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

Locations

Tests codecov Latest Version on Packagist License: MIT

Countries, states, cities, atolls and islands for Laravel:

  • Data: all 249 ISO 3166-1 countries (codes, English and Dhivehi names, calling codes), every Maldivian atoll (letter and ISO 3166-2 codes, official names) and every island of the national island register (feature codes, Dhivehi names, categories, coordinates). All seeded from cited, authoritative sources.
  • Selects: cascading selects (country → atoll → island) for Blade (javaabu/forms), React (@javaabu/forms) and javaabu/stencil.
  • Admin pages: in Blade or Inertia React, authorized with javaabu/permissions.
php artisan migrate
php artisan locations:seed
use Javaabu\Locations\Models\Island;

$island = Island::findByCode('LD0568');

$island->dhivehi_name;          // ދިއްދޫ
$island->formattedName('dv');   // ހއ. ދިއްދޫ
$island->category->label();     // Residential

Island::query()->ofAtoll('HA')->inhabited()->ordered()->get();
<x-forms::form :model="$address">
    <x-locations::atoll-select name="atoll_id" child="island_id" />
    <x-locations::island-select name="island_id" parent="atoll_id" />
</x-forms::form>
Route::locationOptions();                                   // what the cascading selects load from
Route::locations(['guard' => 'web_admin']);                 // admin pages for every type

Documentation

The docs are in docs/, and will be published on docs.javaabu.com. For AI assistants, llms.txt lists the rules and every page, and the package ships a Laravel Boost guideline and skill.

Where the data comes from, and what still needs a human to review it: Data sources.

Testing

composer test
pnpm install && pnpm test
php bin/validate-data.php

Changelog

See CHANGELOG.

Contributing

See CONTRIBUTING.

Security

If you discover any security related issues, please email info@javaabu.com instead of using the issue tracker.

Credits

The island register contains information licensed under Data Usage License – Geomatics Department of Ministry of Infrastructure, Housing and Urban Development. Country data comes from Debian's iso-codes (LGPL-2.1-or-later) and Google's libphonenumber (Apache-2.0).

License

The MIT License (MIT). Please see License File for more information.

About

Location data management: countries, states, cities, atolls and islands, with seedable data for every country and every Maldivian atoll and island, plus views and controllers

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0