*/ class PlatformInstanceFactory extends Factory { protected $model = PlatformInstance::class; public function definition(): array { return [ 'platform' => 'lemmy', 'name' => $this->faker->words(2, true), 'url' => $this->faker->url(), 'is_active' => true, ]; } public function inactive(): static { return $this->state(fn (array $attributes) => [ 'is_active' => false, ]); } public function lemmy(): static { return $this->state(fn (array $attributes) => [ 'platform' => 'lemmy', 'name' => 'Lemmy ' . $this->faker->word(), 'url' => 'https://lemmy.' . $this->faker->domainName(), ]); } }