Web Development Featured 3 min read 173 views

Filament Money — Simplified Money Input for FilamentPHP

A lightweight FilamentPHP plugin that simplifies handling money inputs with built-in currency formatting and clean integration.

D
Diki Akbar Asyidiq
Oct 26, 2025
Share:
Filament Money — Simplified Money Input for FilamentPHP

Filament Money — Simplified Money Input for FilamentPHP

When working with FilamentPHP, one of the most common form fields we use is numeric input — especially when dealing with prices, balances, or other money-related data. However, formatting and validating currency values can quickly become messy.

That’s why I built Filament Money, a lightweight Filament plugin that makes handling money inputs clean, simple, and developer-friendly.


✨ What Is Filament Money?

Filament Money is a FilamentPHP plugin that provides an easy-to-use money input field, complete with:

  • Currency formatting (default: IDR)
  • Configurable decimal places
  • Seamless integration with Filament Forms

It’s designed to help you focus on building features — not fighting with number formatting.


⚙️ Installation

You can install the package via Composer:

composer require codewithdiki/filament-money

Optionally, you can publish the config file to customize default settings:

php artisan vendor:publish --tag="filament-money-config"

The published config file looks like this:

return [
    'currency' => 'IDR',
    'decimal_places' => 2
];

You can also publish the views if you need to customize the UI:

php artisan vendor:publish --tag="filament-money-views"

💡 Usage Example

Once installed, you can use it directly in your Filament form components:

use CodeWithDiki\FilamentMoney\Forms\Components\Money;

Money::make('price');

That’s it — your input field will automatically format and handle currency values based on your configuration.


🧱 Why I Built It

When I was building a POS-style application using Filament, I found myself repeating the same logic for handling prices — adding currency symbols, formatting decimals, and making sure the value was stored cleanly in the database.

Instead of rewriting that code again and again, I decided to package it properly — so both I and other developers could reuse it easily. Thus, Filament Money was born.


🤝 Contributing

If you have ideas for improvements or additional features (like auto currency conversion or live formatting), feel free to contribute! Pull requests are welcome on GitHub → codewithdiki/filament-money.


🧾 License

This package is open-source software licensed under the MIT License — you’re free to use and modify it for your own projects.


🔗 Quick Links


🚀 Final Thoughts

Filament Money is a small but handy tool that saves time and ensures consistency when dealing with monetary inputs in FilamentPHP.

Whether you’re building e-commerce, POS, or financial dashboards, this plugin keeps your forms clean and your data properly formatted — just like it should be.

Tags

PHP Laravel HTML Tailwind CSS Clean Code Full Stack Backend Frontend Open Source Productivity Learning
D

About Diki Akbar Asyidiq

Software Engineer

Comments (0)

Leave a Comment

Comments are moderated and will appear after approval.

No Comments Yet

Be the first to share your thoughts!