Use the random_int function
This commit is contained in:
@@ -72,7 +72,7 @@ class DemoMetricPointSeederCommand extends Command
|
|||||||
|
|
||||||
MetricPoint::create([
|
MetricPoint::create([
|
||||||
'metric_id' => 1,
|
'metric_id' => 1,
|
||||||
'value' => rand(1, 10),
|
'value' => random_int(1, 10),
|
||||||
'created_at' => $metricTime,
|
'created_at' => $metricTime,
|
||||||
'updated_at' => $metricTime,
|
'updated_at' => $metricTime,
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ class DemoSeederCommand extends Command
|
|||||||
|
|
||||||
MetricPoint::create([
|
MetricPoint::create([
|
||||||
'metric_id' => 1,
|
'metric_id' => 1,
|
||||||
'value' => rand(1, 10),
|
'value' => random_int(1, 10),
|
||||||
'created_at' => $metricTime,
|
'created_at' => $metricTime,
|
||||||
'updated_at' => $metricTime,
|
'updated_at' => $metricTime,
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ $factory->define('CachetHQ\Cachet\Models\Metric', function ($faker) {
|
|||||||
$factory->define('CachetHQ\Cachet\Models\MetricPoint', function ($faker) {
|
$factory->define('CachetHQ\Cachet\Models\MetricPoint', function ($faker) {
|
||||||
return [
|
return [
|
||||||
'metric_id' => 1,
|
'metric_id' => 1,
|
||||||
'value' => rand(1, 100),
|
'value' => random_int(1, 100),
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user