/** * Run the database seeding. */ public function run() { $defaultMetrics = [['name' => 'Cups of coffee', 'suffix' => 'Cups', 'description' => 'How many cups of coffee we\'ve drank.', 'default_value' => 0, 'calc_type' => 1, 'display_chart' => 1]]; Metric::truncate(); foreach ($defaultMetrics as $metric) { Metric::create($metric); } }
/** * Run the database seeding. */ public function run() { $defaultMetrics = [['name' => 'Demo Metric', 'suffix' => 'rnd', 'description' => 'Random data points.', 'default_value' => 0, 'calc_type' => 1, 'display_chart' => 1]]; Metric::truncate(); foreach ($defaultMetrics as $metric) { Metric::create($metric); } }