Exemplo n.º 1
0
 public function create(TableRow $row, array $input)
 {
     $type = array_get($input, 'type');
     $pairs = array_get($input, $type);
     foreach ($pairs['names'] as $key => $value) {
         $pair = new TablePair(['key' => $pairs['names'][$key], 'value' => $pairs['values'][$key]]);
         $row->pairs()->save($pair);
     }
 }
Exemplo n.º 2
0
 public function create(TableRow $row, array $range)
 {
     $pair = new TablePair(['key' => $range['from'], 'value' => $range['to']]);
     $row->pairs()->save($pair);
 }