viewflex's avatar

Filament Address Pro — complete international address management for Filament (v1.0)

I've just released v1.0 of Filament Address Pro, a package that handles the full international address problem for Filament apps — not just a form component, but the complete system.

What's included:

  • Country-aware address forms for 256 countries and territories (17k+ subdivisions)
  • Three input modes: Google Places autocomplete, freeform with auto-geocoding, or manual entry
  • Address verification and standardization via USPS, Google Maps, or Smarty
  • Polymorphic Address model, bulk verify, import/export, quality scoring, audit log, admin panel

Drop it into any Filament resource in a few lines:

// Add the trait to any model
class User extends Model
{
  use HasAddresses;
}
// Add the form to your Filament resource
AddressForm::make()->relationship('address')

Full docs - docs.viewflex.net/filament-address-pro

Live demo and pricing - viewflex.net/packages/premium/filament-address-pro

Happy to answer questions here or in the Filament Discord.

0 likes
1 reply
LaryAI's avatar
Level 58

Certainly! Here’s an example response that you could post as a solution on the Laracasts forum in response to the Filament Address Pro package announcement. This will give fellow users a quick primer on how to integrate and use Filament Address Pro in a typical Filament resource.


Solution: Integrating Filament Address Pro in your Filament Resource

Awesome work on this package—solving the international address nightmare is no small feat.

If anyone is wondering how to implement this in practice, here’s a quick step-by-step guide:

  1. Install the Package

First, if you haven't already, follow the installation instructions in the docs. Typically, that’s:

composer require viewflex/filament-address-pro
php artisan migrate
  1. Add the HasAddresses trait to your model

For example, if you want your User model to have addresses:

use Viewflex\AddressPro\Traits\HasAddresses;

class User extends Model
{
    use HasAddresses;
}
  1. Add the AddressForm to Your Filament Resource

In your Filament resource (e.g., UserResource):

use Viewflex\AddressPro\Filament\AddressForm;

// inside the form() method of your Filament resource/page/panel:
public static function form(Form $form): Form
{
    return $form
        ->schema([
            // ...other fields,

            AddressForm::make()->relationship('addresses'),

            // ...other fields,
        ]);
}

Note:
The relationship must be named addresses unless you’ve customized it.
For polymorphic usage, consult the official documentation.

  1. Configuring Inputs and Verification

You can configure the input mode (e.g., Google Places autocomplete), verification APIs, and more.
Check the docs for all options, e.g.:

AddressForm::make()
    ->relationship('addresses')
    ->inputMode('places') // 'freeform', 'manual'
    ->verificationService('google'); // 'usps', 'smarty'
  1. Display Addresses in Tables or Views

To show the verified/standardized address in your tables or detail views, you might use:

TextColumn::make('addresses.formatted_address'),
  1. More Features
  • Bulk verification: Use artisan commands or the admin panel
  • Audit logging, import/export, scoring: All via the built-in admin panel

Full Docs:
For all configuration and advanced use cases (bulk verification, API keys, polymorphism), see: https://docs.viewflex.net/filament-address-pro

Demo and Pricing:
See: https://viewflex.net/packages/premium/filament-address-pro

If you run into any specific integration questions, feel free to ask!


Example Code Recap:

// User model
use Viewflex\AddressPro\Traits\HasAddresses;

class User extends Model
{
    use HasAddresses;
}

// In your Filament resource's form schema
use Viewflex\AddressPro\Filament\AddressForm;

public static function form(Form $form): Form
{
    return $form
        ->schema([
            AddressForm::make()->relationship('addresses'),
        ]);
}

Hope this helps anyone curious about how to get started! 🎉

Please or to participate in this conversation.