Skip to content

Commit

Permalink
Styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mihkelallorg committed Mar 6, 2019
1 parent ec5fdb0 commit f4bfbc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Traits/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ public function createTranslation($field, $language, $translation)
*/
public function getTranslationsAsArray()
{
return $this->translations->groupBy('language')->map(function($language) {
return $language->groupBy('field')->map(function($field) {
return $this->translations->groupBy('language')->map(function ($language) {
return $language->groupBy('field')->map(function ($field) {
return $field->first()->value;
});
})->each(function($values, $language) {
})->each(function ($values, $language) {
$values->put('language', $language);
})->values()->toArray();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/TranslatableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Mihkullorg\Tests\Translatable;

use Carbon\Carbon;
use Mihkullorg\Tests\Translatable\Models\TestModel;
use Mihkullorg\Translatable\Facades\Translator;
use Mihkullorg\Tests\Translatable\Models\TestModel;

class TranslatableTest extends TestCase
{
Expand Down

0 comments on commit f4bfbc6

Please sign in to comment.