Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Apr 11, 2019
2 parents 42d1dd7 + 2f907ac commit 059ec8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"require": {
"php": ">=7.1.0",
"joedixon/laravel-translation": "^0.1.0"
"joedixon/laravel-translation": "^0.2.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Controllers/LanguageTranslationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function index(Request $request, $language)
public function update(Request $request, $language)
{
if (! str_contains($request->get('group'), 'single')) {
$this->translation->addGroupTranslation($language, "{$request->get('group')}.{$request->get('key')}", $request->get('value') ?: '');
$this->translation->addGroupTranslation($language, $request->get('group'), $request->get('key'), $request->get('value') ?: '');
} else {
$this->translation->addSingleTranslation($language, $request->get('group'), $request->get('key'), $request->get('value') ?: '');
}
Expand All @@ -64,7 +64,7 @@ public function store(TranslationRequest $request, $language)
{
if ($request->has('group') && $request->get('group')) {
$namespace = $request->has('namespace') && $request->get('namespace') ? "{$request->get('namespace')}::" : '';
$this->translation->addGroupTranslation($language, "{$namespace}{$request->get('group')}.{$request->get('key')}", $request->get('value') ?: '');
$this->translation->addGroupTranslation($language, "{$namespace}{$request->get('group')}", $request->get('key'), $request->get('value') ?: '');
} else {
$this->translation->addSingleTranslation($language, $request->get('key'), $request->get('value') ?: '');
}
Expand Down

0 comments on commit 059ec8a

Please sign in to comment.