Skip to content

Commit 159ab6d

Browse files
committed
fix strict mode
1 parent 9702932 commit 159ab6d

File tree

2 files changed

+7
-25
lines changed

2 files changed

+7
-25
lines changed

readme.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,6 @@ Remember to launch migration:
4646
php artisan migrate
4747
```
4848

49-
Moreover, you have to disable `ONLY_FULL_GROUP_ID` strict mode for database connection. There are two ways:
50-
51-
```php
52-
'mysql' => [
53-
// ...
54-
'strict' => false,
55-
],
56-
```
57-
58-
or
59-
60-
```php
61-
'mysql' => [
62-
// ...
63-
'modes' => [
64-
'NO_ZERO_DATE',
65-
// you can specify what you want, without ONLY_FULL_GROUP_ID
66-
],
67-
],
68-
```
69-
7049
Workflow
7150
------------
7251

@@ -329,6 +308,9 @@ Do not use this inside of non-clickable elements (title attribute, alt attribute
329308
Changelog
330309
---------
331310

311+
0.5.0
312+
* No STRICT_MODE needed anymore
313+
332314
0.4.5
333315
* Laravel 5.6 support
334316

src/Service.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function loadLocales()
2828

2929
public function getGroups()
3030
{
31-
$groups = Translation::groupBy('group');
31+
$groups = Translation::select('group');
3232
$excludedGroups = $this->manager->getConfig('exclude_groups');
3333
if($excludedGroups) {
3434
$groups->whereNotIn('group', $excludedGroups);
@@ -68,13 +68,13 @@ public function getHighlighted()
6868
$locale = config('app.locale');
6969

7070
$notPublished = Translation::where('status', Translation::STATUS_CHANGED)
71-
->groupBy('group')
71+
->select('group')
7272
->get()
7373
->pluck('group')
7474
->all();
7575

7676
$empty = Translation::whereNull('value')
77-
->groupBy('group')
77+
->select('group')
7878
->get()
7979
->pluck('group')
8080
->all();
@@ -83,7 +83,7 @@ public function getHighlighted()
8383
if(config('translation-manager.highlight_locale_marked'))
8484
$notTranslated = Translation::where('value', 'like binary', '%'. strtoupper($locale))
8585
->where('locale', $locale)
86-
->groupBy('group')
86+
->select('group')
8787
->get()
8888
->pluck('group')
8989
->all();

0 commit comments

Comments
 (0)