StreakFit — API Laravel 13 OSDD + Octane/FrankenPHP
Build & Deploy / build (push) Successful in 18s

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-19 03:00:17 +02:00
co-authored by Claude Opus 4.8
commit af32669931
300 changed files with 21235 additions and 0 deletions
@@ -0,0 +1,50 @@
<?php
namespace Functional\Routines\Database\Factories;
use Functional\Routines\Models\Routine;
use Functional\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends Factory<Routine>
*/
class RoutineFactory extends Factory
{
protected $model = Routine::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
$name = fake()->randomElement([
'Full body débutant', 'Push day', 'Pull day', 'Leg day', 'Upper body',
'Circuit HIIT', 'Force 5x5', 'Hypertrophie bras', 'Core & mobilité',
]) . ' ' . fake()->numberBetween(1, 9);
return [
'user_id' => User::factory(),
'name' => $name,
'slug' => Str::slug($name) . '-' . fake()->unique()->numberBetween(1000, 9999),
'description' => fake()->boolean(70) ? fake()->sentence(12) : null,
'is_public' => fake()->boolean(30),
'estimated_minutes' => fake()->optional(0.8)->numberBetween(20, 90),
];
}
/** Routine partagée publiquement (visible du catalogue communautaire). */
public function public(): static
{
return $this->state(fn (array $attributes) => ['is_public' => true]);
}
/** Routine privée, réservée à son propriétaire. */
public function private(): static
{
return $this->state(fn (array $attributes) => ['is_public' => false]);
}
}