| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function run() |
||
| 26 | { |
||
| 27 | // Initializing variables. |
||
| 28 | $createdAt = date('Y-m-d H:i:s'); |
||
| 29 | $types = []; |
||
| 30 | |||
| 31 | // Definition of default countries. |
||
| 32 | $types[] = ['name' => 'home', 'global' => true]; |
||
| 33 | $types[] = ['name' => 'work', 'global' => true]; |
||
| 34 | $types[] = ['name' => 'other', 'global' => true]; |
||
| 35 | |||
| 36 | foreach ($types as $id => $type) { |
||
| 37 | $types[$id] = array_merge($type, ['created_at' => $createdAt, 'updated_at' => $createdAt]); |
||
| 38 | } |
||
| 39 | |||
| 40 | $tableNames = config('pwweb.localisation.table_names'); |
||
| 41 | |||
| 42 | DB::table($tableNames['address_types'])->insert($types); |
||
| 43 | } |
||
| 45 |