get('https://api.restream.io/v2/platform/all'); $data = json_decode($response->getBody()); Log::info($data); return redirect()->route('livestream.index'); } public function servers(Request $request) { $client = new Client(); $response = $client->get('https://api.restream.io/v2/server/all'); $data = json_decode($response->getBody()); Log::info($data); return redirect()->route('livestream.index'); } public function channels(Request $request) { $token = RestreamToken::first(); if ($token) { $client = new Client(); $response = $client->get('https://api.restream.io/v2/user/channel/all', [ 'headers' => [ 'Authorization' => "{$token->type} {$token->access_token}", ], ]); $data = json_decode($response->getBody()); Log::info($data); } return redirect()->route('livestream.index'); } }