コード例 #1
0
ファイル: Importer.php プロジェクト: sasik-github/system.pro
 /**
  * @param array $row
  */
 private function exportToDb($row)
 {
     if (isset($this->children[(int) $row[2]])) {
         return;
     }
     Child::create(['fio' => $row[0], 'card_number' => $row[2]]);
 }
コード例 #2
0
 private function exportToDb(array $row)
 {
     Child::create(['fio' => $row[0], 'card_number' => $row[2]]);
 }
コード例 #3
0
 public function create($attributes)
 {
     $child = Child::create($attributes);
     $this->syncParents($child, $attributes);
     return $child;
 }
コード例 #4
0
 private function createChild()
 {
     return \App\Models\Child::create(['fio' => 'Ребенок Иванова ' . rand(1, 10000), 'class' => rand(1, 11), 'class_char' => 'A', 'card_number' => rand(1000, 99999), 'city' => 'Кемерово', 'school_number' => rand(10, 100)]);
 }