Commit 049efd92e37ef476893d735844509f4cbc140337
1 parent
cceca61a
testing
Showing
2 changed files
with
5 additions
and
6 deletions
Show diff stats
backend/controllers/ReportController.php
@@ -14,12 +14,8 @@ use yii\web\Controller; | @@ -14,12 +14,8 @@ use yii\web\Controller; | ||
14 | class ReportController extends Controller | 14 | class ReportController extends Controller |
15 | { | 15 | { |
16 | public function actionIndex() { | 16 | public function actionIndex() { |
17 | - $service = new Google_Service_Translate(\Yii::$app->googleApi->client); | ||
18 | - $result = $service->languages->listLanguages([ | ||
19 | - 'target' => 'ru' | ||
20 | - ]); | 17 | + |
21 | return $this->render('index', [ | 18 | return $this->render('index', [ |
22 | - 'result' => $result | ||
23 | ]); | 19 | ]); |
24 | } | 20 | } |
25 | } | 21 | } |
26 | \ No newline at end of file | 22 | \ No newline at end of file |
backend/views/report/index.php
@@ -19,7 +19,10 @@ $this->params['breadcrumbs'][] = $this->title; | @@ -19,7 +19,10 @@ $this->params['breadcrumbs'][] = $this->title; | ||
19 | <div> | 19 | <div> |
20 | <h1><?= Html::encode($this->title) ?></h1> | 20 | <h1><?= Html::encode($this->title) ?></h1> |
21 | <?php | 21 | <?php |
22 | - | 22 | + $service = new Google_Service_Translate(\Yii::$app->googleApi->client); |
23 | + $result = $service->languages->listLanguages([ | ||
24 | + 'target' => 'ru' | ||
25 | + ]); | ||
23 | print_r($result); | 26 | print_r($result); |
24 | ?> | 27 | ?> |
25 | </div> | 28 | </div> |
26 | \ No newline at end of file | 29 | \ No newline at end of file |