/** * Seed the incidents table. * * @return void */ protected function seedIncidents() { $defaultIncidents = [['name' => 'Awesome', 'message' => 'We totally nailed the fix :smile:', 'status' => 4, 'component_id' => 0, 'scheduled_at' => null, 'visible' => 1], ['name' => 'Monitoring the fix', 'message' => "We're checking that our fix will first work.", 'status' => 3, 'component_id' => 0, 'scheduled_at' => null, 'visible' => 1], ['name' => 'Update', 'message' => "We've found the problem, so we're looking at it.", 'status' => 2, 'component_id' => 0, 'scheduled_at' => null, 'visible' => 1], ['name' => 'Test Incident', 'message' => 'Something went wrong, oh noes.', 'status' => 1, 'component_id' => 0, 'scheduled_at' => null, 'visible' => 1]]; Incident::truncate(); foreach ($defaultIncidents as $incident) { Incident::create($incident); } }
/** * Run the database seeding. * * @return void */ public function run() { Model::unguard(); $defaultIncidents = [["name" => "Awesome", "message" => "We totally nailed the fix.", "status" => 4, "component_id" => 0, "user_id" => 1], ["name" => "Monitoring the fix", "message" => "We're checking that our fix will first work.", "status" => 3, "component_id" => 0, "user_id" => 1], ["name" => "Update", "message" => "We've found the problem, so we're looking at it.", "status" => 2, "component_id" => 0, "user_id" => 1], ["name" => "Test Incident", "message" => "Something went wrong, oh noes.", "component_id" => 0, "user_id" => 1]]; Incident::truncate(); foreach ($defaultIncidents as $incident) { Incident::create($incident); } }
/** * Seed the incidents table. * * @return void */ protected function seedIncidents() { $incidentMessage = <<<'EINCIDENT' # Of course it does! What kind of web application doesn't these days? ## Headers are fun aren't they It's _exactly_ why we need Markdown. For **emphasis** and such. EINCIDENT; $defaultIncidents = [['name' => 'Cachet supports Markdown!', 'message' => $incidentMessage, 'status' => 4, 'component_id' => 0, 'scheduled_at' => null, 'visible' => 1], ['name' => 'Awesome', 'message' => ':+1: We totally nailed the fix.', 'status' => 4, 'component_id' => 0, 'scheduled_at' => null, 'visible' => 1], ['name' => 'Monitoring the fix', 'message' => ":ship: We've deployed a fix.", 'status' => 3, 'component_id' => 0, 'scheduled_at' => null, 'visible' => 1], ['name' => 'Update', 'message' => "We've identified the problem. Our engineers are currently looking at it.", 'status' => 2, 'component_id' => 0, 'scheduled_at' => null, 'visible' => 1], ['name' => 'Test Incident', 'message' => 'Something went wrong, with something or another.', 'status' => 1, 'component_id' => 0, 'scheduled_at' => null, 'visible' => 1], ['name' => 'Investigating the API', 'message' => ':zap: We\'ve seen high response times from our API. It looks to be fixing itself as time goes on.', 'status' => 1, 'component_id' => 1, 'scheduled_at' => null, 'visible' => 1]]; Incident::truncate(); foreach ($defaultIncidents as $incident) { Incident::create($incident); } }
/** * Seed the incidents table. * * @return void */ protected function seedIncidents() { $defaultIncidents = [['name' => 'Awesome', 'message' => ':+1: We totally nailed the fix.', 'status' => 4, 'component_id' => 0, 'scheduled_at' => null, 'visible' => 1], ['name' => 'Monitoring the fix', 'message' => ":ship: We've deployed a fix.", 'status' => 3, 'component_id' => 0, 'scheduled_at' => null, 'visible' => 1], ['name' => 'Update', 'message' => "We've identified the problem. Our engineers are currently looking at it.", 'status' => 2, 'component_id' => 0, 'scheduled_at' => null, 'visible' => 1], ['name' => 'Test Incident', 'message' => 'Something went wrong, with something or another.', 'status' => 1, 'component_id' => 0, 'scheduled_at' => null, 'visible' => 1], ['name' => 'Investigating the API', 'message' => ':zap: We\'ve seen high response times from our API. It looks to be fixing itself as time goes on.', 'status' => 1, 'component_id' => 1, 'scheduled_at' => null, 'visible' => 1]]; Incident::truncate(); foreach ($defaultIncidents as $incident) { Incident::create($incident); } }