Skip to content

Conversation

@PatBriPerso
Copy link
Contributor

I need to have billing plans in euro (€) so I add a currency symbol for each plan in the database.

@bobbyiliev bobbyiliev requested review from Copilot and tnylea and removed request for tnylea October 15, 2025 09:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for custom currency symbols in billing plans to enable pricing in different currencies like euros (€). The implementation adds a new currency column to the plans table and updates the UI to display the configurable currency symbol instead of the hardcoded dollar sign.

Key changes:

  • Added database migration to include a currency column in the plans table with a default value of '$'
  • Updated Blade templates to display the plan's currency symbol instead of hardcoded '$'
  • Enhanced the Filament admin interface to allow editing and viewing the currency field

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
wave/database/migrations/2025_10_14_143501_add_currency_column.php Adds currency column to plans table with '$' default
wave/resources/views/livewire/billing/checkout.blade.php Replaces hardcoded '$' with dynamic currency symbol
resources/themes/anchor/components/marketing/sections/pricing.blade.php Updates pricing display to use plan's currency
app/Filament/Resources/Plans/PlanResource.php Adds currency field to admin form and table view

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 84 to 85
TextInput::make('currency')
->maxLength(191),
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The currency field should have input validation to ensure only valid currency symbols are entered. Consider adding a validation rule or using a Select component with predefined currency options.

Suggested change
TextInput::make('currency')
->maxLength(191),
Select::make('currency')
->options([
'USD' => 'USD',
'EUR' => 'EUR',
'GBP' => 'GBP',
'AUD' => 'AUD',
'CAD' => 'CAD',
'JPY' => 'JPY',
'CHF' => 'CHF',
'CNY' => 'CNY',
'INR' => 'INR',
// Add more as needed
])
->searchable()
->required(),

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bobbyiliev, it could be a good idea to have a currency list but with symbols not the 3 letters codes.

Before I do this PR, I see Laravel libs that has all the world currency symbols but it seems to be too much imo (100+ currencies).
To keep it simple, I can just add a few symbols like $, , £ and ¥. What do you think?

I can also, may be, reduce the size of the column to 1 character (or 3 if we put the code later). What do you think?

@bobbyiliev bobbyiliev requested a review from tnylea October 19, 2025 14:34
Copy link
Contributor

@tnylea tnylea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I'll be reviewing today and tomorrow to do a final check and get this merged in. Appreciate it @PatBriPerso

@PatBriPerso
Copy link
Contributor Author

I push 2 more commits:

  • add a few symbols $, €, £ and ¥ in a select list for edit/new plan forms
  • change migration to reduce the size of the column to 3 characters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants