public function run() { $faker = Faker::create(); $actions = ActionType::get(); $users = User::get(); #Category foreach (range(1, 20) as $void) { Comment::create(['user_id' => $users->random(1)->id, 'action_type_id' => $actions->random(1)->id, 'source_id' => $faker->numberBetween(50, 1000000), 'comment' => $faker->text(50)]); } }
public function run() { $faker = Faker::create(); $actions = ActionType::get(); $users = User::select('id')->get(); //Category foreach (range(1, 20) as $void) { Log::create(['user_id' => $users->random(1)->id, 'action_type_id' => $actions->random(1)->id, 'source_id' => $faker->numberBetween(50, 1000000), 'details' => $faker->text(50)]); } }