Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

andrydox's avatar

HTTP Request in Laravel

hi teams, im new in laravel and learning about Microsoft Graphs, i found about HTTP Request in the tutorial page, but don't know where i must insert the code. the code looks like :

GET /me/calendarGroup/calendars/{id}
GET /users/{id | userPrincipalName}/calendarGroup/calendars/{id}

thanks for the help.

0 likes
5 replies
rodrigo.pedra's avatar

Laravel has a HTTP client that you could use:

https://laravel.com/docs/8.x/http-client

Then you could make those requests with a code similar to this:

use Illuminate\Support\Facades\Http;

$url = $baseMicrosoftGraphsURL . '/me/calendarGroup/calendars/' . $calendarId;

$response = Http::get($url);

Where $baseMicrosoftGraphsURL is the base URL for the Microsoft Graphs API and $calendarId is the calendar id I guess you need to replace in the first sample URL from your post.

I also think you might need to send additional headers for authentication into the Microsoft Graphs API.

Please refer to both Microsoft Graphs API documentation and Laravel documentation on HTTP client to see how to send any needed headers, and which value you need to send to authenticate your request.

Hope it helps.

andrydox's avatar

Thankyou for the answer and the explanation, i understand what you mean

1 like

Please or to participate in this conversation.