Files
Speedtest-Tracker/database/factories/SpeedtestFactory.php
2021-04-10 22:32:51 +01:00

32 lines
617 B
PHP

<?php
namespace Database\Factories;
use App\Models\Speedtest;
use Illuminate\Database\Eloquent\Factories\Factory;
class SpeedtestFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Speedtest::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'download' => rand(15, 900),
'upload' => rand(15, 900),
'ping' => rand(1, 25),
'scheduled' => (bool) rand(0, 1),
];
}
}