Example #1
0
 public function run()
 {
     Model::unguard();
     $times = 5;
     for ($i = 0; $i < $times; $i++) {
         Tasks::create(array('name' => Str::random(), 'active' => rand(0, 1)));
     }
 }
Example #2
0
 public function run()
 {
     for ($i = 0; $i <= 20; $i++) {
         Tasks::create(['id' => $i + 1, 'title' => 'Задача ' . $i, 'complete' => rand(0, 1) == 1]);
     }
 }