*/ class SourceControlFactory extends Factory { protected $model = SourceControl::class; public function definition(): array { return [ 'access_token' => Str::random(10), 'provider' => Github::id(), 'profile' => $this->faker->name, 'project_id' => null, ]; } /** * @return Factory */ public function gitlab(): Factory { return $this->state(fn (array $attributes): array => [ 'provider' => Gitlab::id(), ]); } /** * @return Factory */ public function github(): Factory { return $this->state(fn (array $attributes): array => [ 'provider' => Github::id(), ]); } /** * @return Factory */ public function bitbucket(): Factory { return $this->state(fn (array $attributes): array => [ 'provider' => Bitbucket::id(), ]); } }