Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Subscriptions Filament Laravel Package

crumbls/subscriptions-filament

A Filament plugin for managing plans, subscriptions, and subscriber lifecycles in Laravel admin panels, with ready-made resources, widgets, and actions for viewing and controlling billing data.

View on GitHub
Deep Wiki
Context7

Getting Started

  1. Install the package via Composer and ensure crumbls/subscriptions 2.x is installed.
  2. If the package publishes config or migrations, run php artisan vendor:publish and php artisan migrate.
  3. Add the PlansTable to a Filament resource or page to manage subscription plans.
  4. Use MoneyField and CurrencyField in your plan create/edit forms.

Where to look first: The package README for PlansTable, MoneyField, and CurrencyField usage examples. Check your Plan model to confirm it has a decimal price column (e.g., decimal:2 cast) and any required currency columns.

First use case: Create a Filament resource for your Plan model, replace the default table with PlansTable, and use MoneyField / CurrencyField in the form. As of v2.1.1, you no longer need to implement formattedPrice() on your Plan model—the package formats decimal prices automatically. If you already have a custom formattedPrice() method, it will still be honored.

Implementation Patterns

  • Plan management UI: Use PlansTable as the table in a Filament resource for your Plan model. It provides a ready-made table for listing plans with formatted prices, likely including columns for name, price, interval, etc.
  • Form fields: Use MoneyField for the price input and CurrencyField for currency selection in create/edit forms. These fields are now compatible with crumbls/subscriptions 2.x without requiring an unreleased currency service.
  • Custom price formatting: If you need special formatting (e.g., localized currency symbols, custom rounding), implement formattedPrice() on your Plan model. The package will call it instead of its default decimal formatting.
  • Integration with existing resources: You can mix PlansTable with other Filament table columns/actions, or use the fields standalone in any form.
  • Multi-currency: Since the currency service dependency was removed, the fields likely rely on a simpler currency list. For advanced multi-currency conversion or formatting, handle it outside these fields (e.g., via model accessors or a custom service) and feed the formatted value into the table.

Gotchas and Tips

  • Price storage: The package now formats decimal plan prices itself. Store prices as decimals (e.g., 19.99), not as integer cents. If your price column is stored in cents, either convert it to decimal or implement formattedPrice() to handle the conversion.
  • Custom formattedPrice(): If your Plan model already implements formattedPrice(), ensure it returns a string and does not rely on the removed currency service. The package will use it as-is, which can override the built-in formatting.
  • Compatibility: This release targets crumbls/subscriptions 2.x. If you are on an older version, upgrade before using this package version.
  • Debugging formatting: If prices appear incorrectly, check the price column cast and whether formattedPrice() exists on your model. Use dd($plan->formattedPrice()) to see what the package receives.
  • Extension points: You can extend PlansTable, MoneyField, or CurrencyField classes if you need additional columns or validation. For currency behavior, consider overriding the field’s options or providing your own currency list via config if available.
  • Config quirks: Check if the package publishes a config file for default currency or formatting options. If not, customization is limited to model methods and field overrides.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle