@@ -18,18 +18,18 @@ discard block |
||
18 | 18 | { |
19 | 19 | static::addGlobalScope(new TranslatableScope); |
20 | 20 | |
21 | - static::saving(function ($model) { |
|
21 | + static::saving(function($model) { |
|
22 | 22 | $model->translatable = collect($model->attributes)->only(static::$transtableFieldName)->toArray(); |
23 | 23 | $model->attributes = collect($model->attributes)->except(static::$transtableFieldName)->toArray(); |
24 | 24 | }); |
25 | 25 | |
26 | - static::saved(function ($model) { |
|
26 | + static::saved(function($model) { |
|
27 | 27 | if ($model->translatable) { |
28 | 28 | (new self)->saveTranslation($model); |
29 | 29 | } |
30 | 30 | }); |
31 | 31 | |
32 | - static::deleted(function ($model) { |
|
32 | + static::deleted(function($model) { |
|
33 | 33 | if ((new $model)->has('translations')) { |
34 | 34 | $model->translations()->delete(); |
35 | 35 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | // Build the sub select |
69 | - $fields->each(function ($key) use ($query) { |
|
69 | + $fields->each(function($key) use ($query) { |
|
70 | 70 | $this->subSelectTranslation($query, $key); |
71 | 71 | }); |
72 | 72 |