/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = Faker::create();
     $topics = c2a(Topic::lists('id'));
     $tags = c2a(Tag::lists('id'));
     foreach (range(0, 30) as $index) {
         topic_tag_relationship::create(['topic_id' => $faker->randomElement($topics), 'tag_id' => $faker->randomElement($tags)]);
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = Faker::create();
     $topics = c2a(Topic::lists('id'));
     $users = c2a(User::lists('id'));
     foreach (range(1, 100) as $index) {
         Reply::create(['topic_id' => $faker->randomElement($topics), 'user_id' => $faker->randomElement($users), 'content' => $faker->sentence(100)]);
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = Faker::create();
     $products = c2a(Product::lists('id'));
     $users = c2a(User::lists('id'));
     foreach (range(1, 20) as $index) {
         Topic::create(['title' => $faker->sentence(6), 'slug' => $faker->name, 'product_id' => $faker->randomElement($products), 'user_id' => $faker->randomElement($users), 'keywords' => $faker->sentence, 'description' => $faker->sentence(10), 'content' => $faker->sentence(100), 'page_view_count' => rand(10, 3059), 'vote_count' => rand(0, 199), 'reply_count' => rand(0, 100)]);
     }
 }