@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $translation = $translation->translate($request->get('locale')); |
38 | 38 | |
39 | 39 | if (null === $translation) { |
40 | - return response()->json(['<tr><td>' . trans('translation::translations.No Revisions yet') . '</td></tr>']); |
|
40 | + return response()->json([ '<tr><td>'.trans('translation::translations.No Revisions yet').'</td></tr>' ]); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | return response()->json($this->formatRevisionHistory($translation->revisionHistory)); |
@@ -45,13 +45,13 @@ discard block |
||
45 | 45 | |
46 | 46 | private function formatRevisionHistory(Collection $revisionHistory) |
47 | 47 | { |
48 | - $formattedHistory = []; |
|
48 | + $formattedHistory = [ ]; |
|
49 | 49 | |
50 | 50 | foreach ($revisionHistory as $history) { |
51 | 51 | if ($history->key == 'created_at' && !$history->old_value) { |
52 | - $formattedHistory[] = $this->getCreatedRevisionTemplate($history); |
|
52 | + $formattedHistory[ ] = $this->getCreatedRevisionTemplate($history); |
|
53 | 53 | } else { |
54 | - $formattedHistory[] = $this->getRevisionTemplate($history); |
|
54 | + $formattedHistory[ ] = $this->getRevisionTemplate($history); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | private function getRevisionTemplate($history) |
62 | 62 | { |
63 | 63 | $timeAgo = $history->created_at->diffForHumans(); |
64 | - $revertRoute = route('admin.translation.translation.update', [$history->revisionable_id, 'oldValue' => $history->oldValue()]); |
|
64 | + $revertRoute = route('admin.translation.translation.update', [ $history->revisionable_id, 'oldValue' => $history->oldValue() ]); |
|
65 | 65 | $edited = trans('translation::translations.edited'); |
66 | 66 | |
67 | 67 | return <<<HTML |
@@ -4,12 +4,12 @@ |
||
4 | 4 | |
5 | 5 | /** @var Router $router */ |
6 | 6 | |
7 | -$router->group(['prefix' =>'/translation'], function (Router $router) { |
|
8 | - $router->bind('translations', function ($id) { |
|
7 | +$router->group([ 'prefix' =>'/translation' ], function(Router $router) { |
|
8 | + $router->bind('translations', function($id) { |
|
9 | 9 | return \Modules\Translation\Entities\TranslationTranslation::find($id); |
10 | 10 | }); |
11 | - $router->get('translations', ['uses' => 'TranslationController@index', 'as' => 'admin.translation.translation.index', ]); |
|
12 | - $router->get('translations/update/{translations}', ['uses' => 'TranslationController@update', 'as' => 'admin.translation.translation.update', ]); |
|
13 | - $router->get('translations/export', ['uses' => 'TranslationController@export', 'as' => 'admin.translation.translation.export', ]); |
|
14 | - $router->post('translations/import', ['uses' => 'TranslationController@import', 'as' => 'admin.translation.translation.import', ]); |
|
11 | + $router->get('translations', [ 'uses' => 'TranslationController@index', 'as' => 'admin.translation.translation.index', ]); |
|
12 | + $router->get('translations/update/{translations}', [ 'uses' => 'TranslationController@update', 'as' => 'admin.translation.translation.update', ]); |
|
13 | + $router->get('translations/export', [ 'uses' => 'TranslationController@export', 'as' => 'admin.translation.translation.export', ]); |
|
14 | + $router->post('translations/import', [ 'uses' => 'TranslationController@import', 'as' => 'admin.translation.translation.import', ]); |
|
15 | 15 | }); |
@@ -4,6 +4,6 @@ |
||
4 | 4 | |
5 | 5 | /** @var $router Router */ |
6 | 6 | |
7 | -$router->post('translation/update', ['uses' => 'TranslationController@update', 'as' => 'api.translation.translations.update', ]); |
|
8 | -$router->post('translation/clearCache', ['uses' => 'TranslationController@clearCache', 'as' => 'api.translation.translations.clearCache']); |
|
9 | -$router->post('translation/revisions', ['uses' => 'TranslationController@revisions', 'as' => 'api.translation.translations.revisions']); |
|
7 | +$router->post('translation/update', [ 'uses' => 'TranslationController@update', 'as' => 'api.translation.translations.update', ]); |
|
8 | +$router->post('translation/clearCache', [ 'uses' => 'TranslationController@clearCache', 'as' => 'api.translation.translations.clearCache' ]); |
|
9 | +$router->post('translation/revisions', [ 'uses' => 'TranslationController@revisions', 'as' => 'api.translation.translations.revisions' ]); |