*/ class FooterCodeFactory extends Factory { protected $model = FooterCode::class; public function definition(): array { return [ 'portal' => fake()->randomElement([ Portal::Both->value, Portal::Presseecho->value, Portal::Businessportal24->value, ]), 'language' => fake()->randomElement([null, 'de', 'en']), 'title' => fake()->sentence(3), 'content' => fake()->paragraph(), 'is_global' => false, 'is_active' => true, 'priority' => fake()->numberBetween(0, 100), ]; } public function global(): static { return $this->state(['is_global' => true]); } public function inactive(): static { return $this->state(['is_active' => false]); } }