From a941da228df66adda43f1c4e7b2a5d5a37d17569 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 17 Feb 2017 21:38:52 +0200 Subject: [PATCH] ga output --- app/library/App/Controllers/GaController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/library/App/Controllers/GaController.php b/app/library/App/Controllers/GaController.php index 17563db..04a8fd7 100644 --- a/app/library/App/Controllers/GaController.php +++ b/app/library/App/Controllers/GaController.php @@ -9,6 +9,7 @@ namespace App\Controllers; +use App\Model\Project; use Google_Client; use Google_Service_AnalyticsReporting; use Google_Service_AnalyticsReporting_DateRange; @@ -80,10 +81,11 @@ class GaController extends CrudResourceController { //have to rewrite code below (2 rows) $response = $response->toSimpleObject(); - die(var_dump($response)); $response = $response->reports[0]['data']['rows']; $result = []; + $project = Project::findFirst(['ga_view_id' => $view_id]); + $result['name'] = $project->name; foreach ($response as $item) { -- libgit2 0.21.4