public function run()
 {
     $faker = Faker\Factory::create();
     $userIds = User::lists('id')->toArray();
     $reviewRequestIds = ReviewRequest::lists('id')->toArray();
     foreach (range(1, 50) as $index) {
         Comment::create(['text' => $faker->text(200), 'user_id' => $faker->randomElement($userIds), 'review_request_id' => $faker->randomElement($reviewRequestIds)]);
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $requestsIds = ReviewRequest::lists('id')->toArray();
     $userIds = User::lists('id')->toArray();
     for ($i = 1; $i < count($requestsIds) - 1; $i++) {
         for ($k = 1; $k < rand(0, 8); $k++) {
             DB::table('review_request_user')->insert(['review_request_id' => $i, 'user_id' => rand(1, count($userIds))]);
         }
     }
 }
 public function run()
 {
     $faker = Faker\Factory::create();
     $requests = [["title" => "Asciit code review", "details" => "Would you like to join to our review?"], ["title" => "Reviewr code review", "details" => "We have fixed almost all bugs after the last review. Just look at this miracle! It works!"], ["title" => "Calendar code review", "details" => "Ok, we prepared a few of the new features, but we need a piece of good advise."], ["title" => "User profile code review", "details" => "Hello! We're glad to invite you to our code review. We have done everything. Our code base is very stable."], ["title" => "News code review", "details" => "Hi! We invite you to take a look at our code. We improved an architecture."], ["title" => "Questionnaire code review", "details" => "Ok, we are ready to share our experience of TDD on our project. Feel free to join."], ["title" => "Hunter code review", "details" => "Hello! We're waiting fo your assessment. Would you like to join?"], ["title" => "Feedbacks code review", "details" => "Hello everybody! Can you estimate our new approach?"], ["title" => "Interview code review", "details" => "Hello! Please, help use to check the usability of our new interface."], ["title" => "Accounting code review", "details" => "Hi there! So, we are ready to describe and share our stable code base. Please, offer us an opinion about it."], ["title" => "Hunter code review", "details" => "Hi there! Please, take a look to result of our great work."], ["title" => "Reviewr", "details" => "Hello! Reviewr is ready for review."]];
     $userIds = User::lists('id')->toArray();
     $groupIds = Group::lists('id')->toArray();
     foreach ($requests as $reviewRequest) {
         ReviewRequest::create(['title' => $reviewRequest['title'], 'details' => $reviewRequest['details'], 'date_review' => $faker->dateTimeBetween('-1 days', '+15 days'), 'user_id' => $faker->randomElement($userIds), 'group_id' => $faker->randomElement($groupIds)]);
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = Faker\Factory::create();
     $tag_titles = ['php', 'javascript', 'c#', 'design', 'css', 'forms', 'gulp', 'marionette', 'backbone', 'jquery', 'laravel', 'laravel5', 'f3', 'zend', 'zend2', 'yii', 'yii2', 'node-js', 'node', 'code-ignite', 'maven', 'symfony2', 'rest', 'email', 'unit-testing', 'mono', 'jade', 'express', 'tlp', 'underscore', 'pagination', 'mvc', 'bootstrap', 'documentation', 'popup', 'collection', 'mysql', '.net', 'arrays', 'ajax', 'regex', 'json', 'angular', 'wordpress', 'string', 'html5', 'git', 'svn', 'apache', 'postgresql', '.htaccess', 'function', 'file', 'image', 'gd', 'phantomjs', 'sorting', 'http', 'opencv', 'firefox', 'ubuntu', 'grep', 'gmail-api'];
     foreach ($tag_titles as $title) {
         Tag::create(['title' => $title]);
     }
     // Insert 3 random tag in every RR
     $tagIds = Tag::lists('id')->toArray();
     $reviewIds = \App\ReviewRequest::lists('id')->toArray();
     foreach ($reviewIds as $rid) {
         DB::table('tag_review_request')->insert([['review_request_id' => $rid, 'tag_id' => $faker->randomElement($tagIds)], ['review_request_id' => $rid, 'tag_id' => $faker->randomElement($tagIds)], ['review_request_id' => $rid, 'tag_id' => $faker->randomElement($tagIds)]]);
     }
 }