Download the PHP package blemli/swissstreets-for-filament without Composer
On this page you can find all versions of the php package blemli/swissstreets-for-filament. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download blemli/swissstreets-for-filament
More information about blemli/swissstreets-for-filament
Files in blemli/swissstreets-for-filament
Package swissstreets-for-filament
Short Description Every Swiss address. Offline.
License MIT
Homepage https://github.com/blemli/swissstreets-for-filament
Informations about the package swissstreets-for-filament
swissstreets
Every Swiss address. Offline. Daily.
Address field for Filament backed by the official Swiss building address register. Nightly update from the official source, works fully offline, sorts by vicinity — no spatial extension required. Support for foreign addresses, because life is messy.
Install
The installer schedules the nightly swissstreets:import in routes/console.php (suggested time 03:00–04:59, hashed from the app name so not every app hits swisstopo in the same minute) and runs the first import. Transient network errors against swisstopo are retried (2 s / 5 s / 10 s); a failed import exits non-zero and says what to do. A run killed mid-import leaves its lock behind — the next run says who held it since when, heals itself when that process is gone from the same host, or takes php artisan swissstreets:import --unlock.
Use
Events: AddressAdded, AddressRemoved, AddressRestored (per address, import or ->freetext() form) and ImportFinished (with the ImportResult) under Blemli\Swissstreets\Events.
Plugin options: ->cantons([...]) limits the import, ->table() adds the browsable addresses table to the panel (with an "Import from swisstopo" button that queues the import — gate it with AddressPolicy::import(), which Filament Shield generates as import_address), ->notify(User::class) (or a closure returning users) sends a database notification after each import that changed something, ->swissgrid() keeps LV95 easting/northing, ->unofficial(), ->planned(), ->health() registers the health check below. Removed addresses are soft-deleted and logged. Remove everything with php artisan swissstreets:uninstall.
Supported plugins
- spatie/laravel-health (shown in the panel by shuvroroy/filament-spatie-laravel-health):
SwissstreetsPlugin::make()->health()(orhealth.enabledin the config; the installer offers it when the package is installed) registers the "Swiss address register" check — red when no address was created, updated or removed for 21 days, yellow when the last 3 imports failed. Thresholds:->health(maxAgeDays: 21, maxFailedRuns: 3). - spatie/laravel-activitylog: every added, removed and restored address is recorded as an activity (log name
swissstreets) when the package is installed; switch off with theactivitylogconfig key.
MIT © blemli
All versions of swissstreets-for-filament with dependencies
filament/filament Version ^4.0|^5.0
spatie/laravel-package-tools Version ^1.15.0