Feat: Adds multi currency support (#88)
This commit is contained in:
@@ -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,
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user