Doh. Factories are dev only.

This commit is contained in:
James Brooks 2015-06-20 11:57:14 +01:00
parent f7b53c06f6
commit 5b1c7a69dd

View File

@ -25,8 +25,11 @@ class MetricPointSeeder extends Seeder
for ($i=0; $i < 11; $i++) {
$metricTime = (new DateTime())->sub(new DateInterval('PT'.$i.'H'));
$pointFactory = factory('CachetHQ\Cachet\Models\MetricPoint');
$point = $pointFactory->create();
$point = MetricPoint::create([
'metric_id' => 1,
'value' => rand(1, 100),
'created_at' => $metricTime,
]);
$point->update([
'created_at' => $metricTime,