diff --git a/app/Console/Commands/DemoMetricPointSeederCommand.php b/app/Console/Commands/DemoMetricPointSeederCommand.php index d20ea27e..7c731b6c 100644 --- a/app/Console/Commands/DemoMetricPointSeederCommand.php +++ b/app/Console/Commands/DemoMetricPointSeederCommand.php @@ -72,7 +72,7 @@ class DemoMetricPointSeederCommand extends Command MetricPoint::create([ 'metric_id' => 1, - 'value' => rand(1, 10), + 'value' => random_int(1, 10), 'created_at' => $metricTime, 'updated_at' => $metricTime, ]); diff --git a/app/Console/Commands/DemoSeederCommand.php b/app/Console/Commands/DemoSeederCommand.php index 5b5a2cba..e68e594f 100644 --- a/app/Console/Commands/DemoSeederCommand.php +++ b/app/Console/Commands/DemoSeederCommand.php @@ -210,7 +210,7 @@ class DemoSeederCommand extends Command MetricPoint::create([ 'metric_id' => 1, - 'value' => rand(1, 10), + 'value' => random_int(1, 10), 'created_at' => $metricTime, 'updated_at' => $metricTime, ]); diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index 95c0359f..ae81fd28 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -62,7 +62,7 @@ $factory->define('CachetHQ\Cachet\Models\Metric', function ($faker) { $factory->define('CachetHQ\Cachet\Models\MetricPoint', function ($faker) { return [ 'metric_id' => 1, - 'value' => rand(1, 100), + 'value' => random_int(1, 100), ]; });