/**
  * Truncate all tables.
  */
 protected function seedInit()
 {
     Owner::truncate();
     User::truncate();
     Project::truncate();
     Member::truncate();
     Issue::truncate();
     Comment::truncate();
     Moment::truncate();
     Setting::truncate();
     Subscriber::truncate();
 }
Beispiel #2
0
 /**
  * Seed the comments table.
  */
 protected function seedMoments()
 {
     $defaultMoments = [['message' => ':+1: We totally nailed the fix.', 'target_type' => 'Issue', 'target_id' => 3, 'action' => Moment::COMMENTED, 'author_id' => 1, 'project_id' => 1], ['message' => ":ship: We've deployed a fix.", 'target_type' => 'Issue', 'target_id' => 2, 'action' => Moment::CREATED, 'author_id' => 1, 'project_id' => 2]];
     Moment::truncate();
     foreach ($defaultMoments as $moment) {
         Moment::create($moment);
     }
 }