Level 1
which package are you using to get data (JSON ) from the URL in laravel?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello guys, i have URL with data (Json). I am a beginner when it comes to API. I need to know where to start to display the obtained data in a blade view. Can someone show me the way?
@ziben69 In laravel5.8, instead of
$jsonData = Client::get('PATH')->json() ;
use
$client = new Client();
$jsonData = $client->get('PATH')->getBody()->getContents();
$noUsers = DB::table('users')->count();
return view('home', [
'jsonData' => $jsonData
]);
Please or to participate in this conversation.