26 lines
673 B
PHP
26 lines
673 B
PHP
<?php
|
|||
|
|
|
||
|
|
namespace Database\Factories;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||
|
|
use Illuminate\Support\Str;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Exercise>
|
||
|
|
*/
|
||
|
|
class ExerciseFactory extends Factory
|
||
|
|
{
|
||
|
|
public function definition(): array
|
||
|
|
{
|
||
|
|
$name = ucfirst(fake()->unique()->words(3, true));
|
||
|
|
|
||
|
|
return [
|
||
|
|
'name' => $name,
|
||
|
|
'slug' => Str::slug($name),
|
||
|
|
'exercise_db_id' => (string) fake()->unique()->numberBetween(1, 999999),
|
||
|
|
'gif_url' => 'https://example.com/exercise.gif',
|
||
|
|
'instructions' => implode("\n", fake()->sentences(3)),
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|