| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | public function run() |
||
| 12 | { |
||
| 13 | $file = __DIR__.'/../../resources/banks.json'; |
||
| 14 | $data = json_decode(file_get_contents($file), true); |
||
| 15 | $banks = array_map(function ($arr) { |
||
| 16 | return [ |
||
| 17 | 'name' => $arr['name'], |
||
| 18 | 'alias' => $arr['alias'], |
||
| 19 | 'company' => $arr['company'], |
||
| 20 | 'code' => $arr['code'], |
||
| 21 | 'created_at' => now()->toDateTimeString(), |
||
| 22 | 'updated_at' => now()->toDateTimeString(), |
||
| 23 | ]; |
||
| 24 | }, $data); |
||
| 25 | |||
| 26 | Banks::insert($banks); |
||
| 27 | } |
||
| 29 |