spatie/laravel-analytics performQuery error
问题 I use spatie laravel google analytics with no error but when I use: $analyticsData = Analytics::performQuery($per,'ga:sessions',$dimen); I get this error: htmlspecialchars() expects parameter 1 to be string, object given All my code is: $startDate = Carbon::now()->subYear(); $endDate = Carbon::now(); $per=Period::create($startDate, $endDate); $dimen=['dimensions' => 'ga:browser']; $analyticsData = Analytics::performQuery($per,'ga:sessions',$dimen); 回答1: You can try like this, just you have to