getVideo($videoGroupInfo['post_id']); return [ 'id' => $videoGroupInfo['id'], 'video_group_id' => $videoGroupInfo['name'], 'created_at' => Carbon::parse($videoGroupInfo['created_at'])->toDateTimeString(), 'post_id' => $videoGroupInfo['post_id'], 'sort' => $videoGroupInfo['sort'], 'username' => isset($videoInfo['username']) ? $videoInfo['username'] : '', 'topic' => isset($videoInfo['topic']) ? $videoInfo['topic'] : '', 'video' => isset($videoInfo['video']) ? $videoInfo['video'] : '', 'img' => isset($videoInfo['img']) ? $videoInfo['img'] : '', 'pv' => isset($videoInfo['pv']) ? $videoInfo['pv'] : '', 'praise_count' => isset($videoInfo['praise_count'])? $videoInfo['praise_count']:'', ]; } public function getVideo($id) { try { $url = config("customer.manage_service_url") . '/community/post/detail'; //$url = 'https://manage.dev.caihongxingqiu.com/community/post/detail'; $array = [ 'json' => ['id' => $id], 'query' => [], 'http_errors' => false, 'headers' => ['Authorization' => "Bearer " . JWTAuth::getToken()] ]; $res = http($url, $array, true, 'get'); return $res; } catch (\Exception $e) { return []; } } }