Skip to content

Commit

Permalink
Code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedary committed Aug 25, 2021
1 parent 78cbf08 commit 900a6e4
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/Http/Controllers/LanguageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ private function editLocalizationFile($values)

$configuration = include($path);

foreach(\App\Models\Region::whereIsRoot()->get() as $region) {
if($region->segment)
foreach($values as $locale => $val) {
if(strlen($locale) == 2)
$values[$locale . '_' . $region->segment] = $val;
}
}

$configuration['supportedLocales'] = $values;

return file_put_contents($path, "<?php return " . preg_replace("/[0-9]+ \=\>/i", '', $this->formatArray($configuration, true)). ";");
Expand Down

0 comments on commit 900a6e4

Please sign in to comment.