/** * Run the database seeds. * * @return void */ public function run() { // Get Faker instance $faker = Faker\Factory::create(); // Create a number of users for ($numRatings = 0; $numRatings < 250; $numRatings++) { UserCommentRating::forceCreate(['comment_id' => rand(1, 25), 'rating' => $faker->boolean(70)]); } }