Skip to content

Commit

Permalink
Merge pull request #11 from joedixon/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
joedixon authored Sep 9, 2019
2 parents 3ceab90 + a7df467 commit 99447c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions 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.3.0"
"joedixon/laravel-translation": "^1.0.0"
},
"autoload": {
"psr-4": {
Expand All @@ -27,4 +27,4 @@
},
"minimum-stability": "dev",
"prefer-stable": true
}
}
5 changes: 3 additions & 2 deletions src/Http/Controllers/LanguageTranslationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Joedixon\NovaTranslation\Http\Controllers;

use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Support\Collection;
use Illuminate\Pagination\Paginator;
Expand Down Expand Up @@ -51,7 +52,7 @@ public function index(Request $request, $language)

public function update(Request $request, $language)
{
if (! str_contains($request->get('group'), 'single')) {
if (! Str::contains($request->get('group'), 'single')) {
$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 Down Expand Up @@ -84,7 +85,7 @@ private function formatTranslations($translations, $language)
continue;
}
$formattedTranslations[] = [
'id' => str_random(20),
'id' => Str::random(20),
'type' => $type,
'group' => $group,
'key' => $key,
Expand Down

0 comments on commit 99447c8

Please sign in to comment.