Feat: Adds multi currency support (#88)

This commit is contained in:
hackerESQ
2025-04-09 19:25:15 -05:00
committed by GitHub
parent 6d6f968f42
commit eae345f243
100 changed files with 17735 additions and 35761 deletions
+14
View File
@@ -34,6 +34,10 @@ class UserFactory extends Factory
'two_factor_recovery_codes' => null,
'remember_token' => Str::random(10),
'profile_photo_path' => null,
'options' => [
'display_currency' => 'USD',
'locale' => 'en',
],
];
}
@@ -46,4 +50,14 @@ class UserFactory extends Factory
'email_verified_at' => null,
]);
}
/**
* Indicate that the model's currency.
*/
public function currency($currency): static
{
return $this->state(fn (array $attributes) => array_merge($attributes['options'], [
'currency' => $currency,
]));
}
}