*/ class ExerciseFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition(): array { $name = fake()->unique()->words(3, true); $ext = fake()->unique()->numerify('####'); return [ 'external_id' => $ext, 'name' => $name, 'slug' => \Illuminate\Support\Str::slug($name . '-' . $ext), 'category' => fake()->randomElement(['waist', 'chest', 'back', 'upper legs', 'shoulders']), 'body_part' => fake()->randomElement(['waist', 'chest', 'back', 'upper legs', 'shoulders']), 'equipment' => fake()->randomElement(['body weight', 'dumbbell', 'barbell', 'cable', 'kettlebell']), 'target' => fake()->randomElement(['abs', 'pectorals', 'lats', 'quads', 'delts']), 'muscle_group' => fake()->word(), 'secondary_muscles' => fake()->randomElements(['hip flexors', 'lower back', 'triceps', 'glutes'], 2), 'instructions' => ['en' => [fake()->sentence()], 'fr' => [fake()->sentence()]], 'image_path' => 'exercises/' . $ext . '.jpg', 'gif_path' => 'exercises/' . $ext . '.gif', 'attribution' => '© Gym visual — https://gymvisual.com/', ]; } }