| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 8 |
| 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 | $languages = []; |
||
| 30 | |||
| 31 | // Definition of default languages. |
||
| 32 | $languages[] = ['name' => 'English', 'locale' => 'en-GB', 'abbreviation' => 'EN', 'installed' => '1', 'active' => '1', 'standard' => '0']; |
||
| 33 | $languages[] = ['name' => 'German', 'locale' => 'de-DE', 'abbreviation' => 'DE', 'installed' => '1', 'active' => '1', 'standard' => '0']; |
||
| 34 | |||
| 35 | foreach ($languages as $id => $language) { |
||
| 36 | $languages[$id] = array_merge($language, ['created_at' => $createdAt, 'updated_at' => $createdAt]); |
||
| 37 | } |
||
| 38 | |||
| 39 | $tableNames = config('pwweb.localisation.table_names'); |
||
| 40 | |||
| 41 | DB::table($tableNames['languages'])->insert($languages); |
||
| 42 | } |
||
| 44 |