Skip to content

Commit

Permalink
Laravel 6.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
adammatysiak committed Sep 4, 2019
1 parent c7d5886 commit 353a221
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Add the following line to the `require` section of your Laravel webapp's `compos

```javascript
"require": {
"HighSolutions/laravel-lang-import-export": "5.4.*"
"HighSolutions/laravel-lang-import-export": "^6.0"
}
```

Expand Down Expand Up @@ -110,6 +110,9 @@ When you call command without parameters - it will try to read default file of e
Changelog
------------

6.0.0
* Support Laravel 6.0

5.4.10
* Laravel 5.7 support

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"license": "MIT",
"require": {
"php": ">=5.6.4",
"illuminate/support": "5.x"
"illuminate/support": "5.*|6.*"
},
"autoload": {
"psr-4": {
Expand All @@ -27,7 +27,7 @@
},
"extra": {
"component": "package",
"frameworks": ["Laravel 5.7"],
"frameworks": ["Laravel 5.7", "Laravel 5.8", "Laravel 6.0"],
"laravel": {
"providers": [
"HighSolutions\\LangImportExport\\LangImportExportServiceProvider"
Expand Down
7 changes: 4 additions & 3 deletions src/LangListService.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Lang;
use File;
use Illuminate\Support\Arr;

class LangListService
{
Expand Down Expand Up @@ -55,7 +56,7 @@ private function isOneGroup($group)
private function getGroup($locale, $group)
{
$translations = Lang::getLoader()->load($locale, $group);
return array_dot($translations);
return Array::dot($translations);
}

/**
Expand Down Expand Up @@ -134,11 +135,11 @@ private function getTranslations($locale, $group, $new_translations)
{
$translations = Lang::getLoader()->load($locale, $group);
foreach($new_translations as $key => $value) {
array_set($translations, $key, $value);
Array::set($translations, $key, $value);
}

if(in_array($group, $this->dotFiles)) {
$translations = array_dot($translations);
$translations = Array::dot($translations);
}

return $translations;
Expand Down

0 comments on commit 353a221

Please sign in to comment.