Files
fitness/database/factories/WeightLogFactory.php
T

22 lines
516 B
PHP
Raw Normal View History

<?php
namespace Database\Factories;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\WeightLog>
*/
class WeightLogFactory extends Factory
{
public function definition(): array
{
return [
'user_id' => User::factory(),
'weight_kg' => fake()->randomFloat(1, 55, 110),
'logged_at' => fake()->dateTimeBetween('-60 days', 'now')->format('Y-m-d'),
];
}
}