*/ class CurrencyFactory extends Factory { /** * The name of the factory's corresponding model. */ protected $model = Currency::class; /** * Define the model's default state. * * @return array */ public function definition(): array { $defaultCurrency = currency('USD'); return [ 'name' => $defaultCurrency->getName(), 'code' => $defaultCurrency->getCurrency(), 'rate' => $defaultCurrency->getRate(), 'precision' => $defaultCurrency->getPrecision(), 'symbol' => $defaultCurrency->getSymbol(), 'symbol_first' => $defaultCurrency->isSymbolFirst(), 'decimal_mark' => $defaultCurrency->getDecimalMark(), 'thousands_separator' => $defaultCurrency->getThousandsSeparator(), 'enabled' => true, ]; } }