-
Notifications
You must be signed in to change notification settings - Fork 902
Add the ability to choose the currency symbol #280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add the ability to choose the currency symbol #280
Conversation
There was a problem hiding this 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
currencycolumn 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.
wave/database/migrations/2025_10_14_143501_add_currency_column.php
Outdated
Show resolved
Hide resolved
| TextInput::make('currency') | ||
| ->maxLength(191), |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
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.
| 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(), |
There was a problem hiding this comment.
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?
….php Co-authored-by: Copilot <[email protected]>
tnylea
left a comment
There was a problem hiding this 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
|
I push 2 more commits:
|
I need to have billing plans in euro (€) so I add a currency symbol for each plan in the database.