PHPackages                             adultdate/filament-postnummer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. adultdate/filament-postnummer

ActiveFilament-plugin[Utility &amp; Helpers](/categories/utility)

adultdate/filament-postnummer
=============================

A Filament v4 plugin for managing Swedish postal codes (postnummer) with data from multiple sources (Hitta, Ratsit, Merinfo).

01PHP

Since Dec 17Pushed 6mo agoCompare

[ Source](https://github.com/adultdate/filament-postnummer)[ Packagist](https://packagist.org/packages/adultdate/filament-postnummer)[ RSS](/packages/adultdate-filament-postnummer/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (1)Used By (0)

Filament Postnummer Plugin
==========================

[](#filament-postnummer-plugin)

A comprehensive Filament v4 plugin for managing Swedish postal codes (postnummer) with data integration from multiple sources including Hitta, Ratsit, and Merinfo.

Features
--------

[](#features)

- **Complete Filament Resource**: Full CRUD operations for Swedish postal codes
- **Multi-Source Data Integration**: Track data from Hitta, Ratsit, and Merinfo
- **Advanced Filtering**: Filter by status, active status, and phone availability
- **API Endpoints**: RESTful API for external integrations
- **Export Functionality**: Export data in various formats
- **Queue Management**: Built-in queue management for data processing
- **Detailed Statistics**: Track counts, saved records, and processing progress

Installation
------------

[](#installation)

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require adultdate/filament-postnummer
```

### 2. Publish Configuration

[](#2-publish-configuration)

```
php artisan vendor:publish --tag="filament-postnummer-config"
```

### 3. Publish and Run Migrations

[](#3-publish-and-run-migrations)

```
php artisan vendor:publish --tag="filament-postnummer-migrations"
php artisan migrate
```

### 4. Register Plugin

[](#4-register-plugin)

Add the plugin to your Filament panel provider (usually `app/Providers/Filament/AdminPanelProvider.php`):

```
use Adultdate\FilamentPostnummer\FilamentPostnummerPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ... other panel configuration
        ->plugin(FilamentPostnummerPlugin::make());
}
```

Configuration
-------------

[](#configuration)

The plugin configuration file is published at `config/filament-postnummer.php`. You can customize:

- Table name
- API routes prefix and middleware
- Resource navigation settings
- External data source configurations

Database Schema
---------------

[](#database-schema)

The plugin creates a `postnummer` table with the following main fields:

- `post_nummer`: Postal code (e.g., "123 45")
- `post_ort`: City name
- `post_lan`: County/region
- Data counts and saved records from Hitta, Ratsit, and Merinfo
- Queue management flags
- Status tracking
- Timestamps

API Routes
----------

[](#api-routes)

The plugin provides the following API endpoints under `/api/postnummer`:

- `GET /` - List all postnummer with filtering and pagination
- `GET /{postNummer}` - Get specific postnummer
- `PUT /{postNummer}` - Update specific postnummer
- `POST /bulk-update` - Bulk update multiple postnummer

### API Usage Examples

[](#api-usage-examples)

#### Get all postnummer

[](#get-all-postnummer)

```
curl -X GET "http://your-app.com/api/postnummer?per_page=50&status=active"
```

#### Get specific postnummer

[](#get-specific-postnummer)

```
curl -X GET "http://your-app.com/api/postnummer/123%2045"
```

#### Update postnummer

[](#update-postnummer)

```
curl -X PUT "http://your-app.com/api/postnummer/123%2045" \
  -H "Content-Type: application/json" \
  -d '{"status": "completed", "is_active": true}'
```

#### Bulk update

[](#bulk-update)

```
curl -X POST "http://your-app.com/api/postnummer/bulk-update" \
  -H "Content-Type: application/json" \
  -d '{
    "post_nummers": ["123 45", "123 46"],
    "data": {"status": "processing"}
  }'
```

Filament Resource Features
--------------------------

[](#filament-resource-features)

### Table Columns

[](#table-columns)

- Basic info: Postal code, city, county
- Data source groups: Hitta, Ratsit, Merinfo with counts and saved records
- Status indicators and queue flags
- Timestamps

### Filters

[](#filters)

- Status filter (pending, running, complete)
- Active status filter
- Phone availability filter

### Actions

[](#actions)

- Standard CRUD operations
- Bulk actions for data management
- Export functionality

Data Sources
------------

[](#data-sources)

The plugin tracks data from three main Swedish directories:

### Hitta.se

[](#hittase)

- Total person and company counts
- Saved records with phone and house information
- Queue management for data processing

### Ratsit.se

[](#ratsitse)

- Person and company data
- Phone and house information
- Processing queues

### Merinfo.se

[](#merinfose)

- Comprehensive person and company data
- Phone number tracking
- Queue and count management

Queue Management
----------------

[](#queue-management)

The plugin includes built-in queue management for processing data from external sources:

- Individual queue flags for each data source
- Bulk queue operations
- Progress tracking
- Status management

Export Functionality
--------------------

[](#export-functionality)

Export postnummer data in various formats:

- CSV
- Excel (XLSX)
- SQLite database

Customization
-------------

[](#customization)

### Custom Fields

[](#custom-fields)

You can extend the Postnummer model with custom fields by:

1. Publishing the migration
2. Adding your columns to the migration
3. Updating the model's `$fillable` and `$casts` arrays
4. Modifying the form schema and table columns

### Custom Actions

[](#custom-actions)

Add custom bulk actions by extending the `PostnummersTable` class:

```
// In your custom table class
public static function configure(Table $table): Table
{
    return $table
        ->actions([
            // ... existing actions
            Action::make('customAction')
                ->label('Custom Action')
                ->action(function ($record) {
                    // Your custom logic
                }),
        ]);
}
```

Troubleshooting
---------------

[](#troubleshooting)

### Migration Issues

[](#migration-issues)

If you encounter migration conflicts, you can:

1. Publish the migration: `php artisan vendor:publish --tag="filament-postnummer-migrations"`
2. Modify the published migration file in `database/migrations/`
3. Run the migration manually: `php artisan migrate`

### Route Conflicts

[](#route-conflicts)

If API routes conflict with existing routes, customize the prefix in the configuration file:

```
// config/filament-postnummer.php
'api' => [
    'prefix' => 'api/custom-postnummer',
],
```

Contributing
------------

[](#contributing)

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests if applicable
5. Submit a pull request

License
-------

[](#license)

This plugin is open-sourced software licensed under the MIT license.

Support
-------

[](#support)

For support and questions:

- Create an issue in the GitHub repository
- Contact:

Changelog
---------

[](#changelog)

### v1.0.0

[](#v100)

- Initial release
- Complete Filament v4 integration
- API endpoints
- Multi-source data tracking
- Queue management
- Export functionality# filament-postnummer

filament-postnummer
===================

[](#filament-postnummer)

filament-postnummer
===================

[](#filament-postnummer-1)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance46

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10224381?v=4)[adultdate](/maintainers/adultdate)[@adultdate](https://github.com/adultdate)

---

Top Contributors

[![blhk0532](https://avatars.githubusercontent.com/u/221689993?v=4)](https://github.com/blhk0532 "blhk0532 (4 commits)")

### Embed Badge

![Health badge](/badges/adultdate-filament-postnummer/health.svg)

```
[![Health](https://phpackages.com/badges/adultdate-filament-postnummer/health.svg)](https://phpackages.com/packages/adultdate-filament-postnummer)
```

###  Alternatives

[creativestyle/theme-creativeshop

Creativeshop Magento Theme

3881.5k4](/packages/creativestyle-theme-creativeshop)[camcima/php-geohash

Refactored GeoHash package

1076.0k](/packages/camcima-php-geohash)[kx1000/kwota-slownie

Kwota słownie

1019.2k1](/packages/kx1000-kwota-slownie)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
