コード例 #1
0
 public function run()
 {
     $faker = Faker::create();
     foreach (range(1, 10) as $index) {
         App\Skill::create(['name' => $faker->word]);
     }
 }
コード例 #2
0
 private function makeSkill($skillField = [])
 {
     $skill = array_merge(['name' => $this->fake->name()], $skillField);
     while ($this->times--) {
         App\Skill::create($skill);
     }
 }