*/ class ScheduleFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Schedule::class; /** * Define the model's default state. */ public function definition(): array { return [ 'server_id' => Server::factory()->withRelationships(), 'name' => fake()->firstName(), ]; } }