*/ class UserSettingFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'user_id' => User::factory(), 'chart_color_scheme' => ChartColorScheme::Colorful, 'include_loans_in_net_worth_chart' => true, 'include_real_estate_in_net_worth_chart' => true, ]; } public function withScheme(ChartColorScheme $scheme): static { return $this->state(fn (array $attributes) => [ 'chart_color_scheme' => $scheme, ]); } }