// Contoh kode PHP Laravel untuk panggilan API
// Pastikan mengganti placeholder dengan informasi yang sesuai

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use GuzzleHttp\Client;


class ApiController extends Controller
{
    public function callApi()
    {
        $apiUrl = 'your-api-url';
        $apiKey = 'your-api-key';

        $client = new Client();
        $response = $client->request('GET', $apiUrl, [
            'headers' => [
                'Ocp-Apim-Subscription-Key' => $apiKey,
            ],
        ]);

        $data = json_decode($response->getBody(), true);

        // Proses hasil respons API di sini
        return response()->json($data);
    }

}