What's Curl::to ? Some kind of cURL helper?
Generally curling, you'll need to target a URL, so 'https://curl-url' won't cut it - as it's not a real URL.
Stick whatever URL you want to download in there and see what happens.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I don't really understand how curl works and this is my first time using curl in laravel. Whenever i try to make a call to any url i get noting, no errors, just no results. here is the code....tell me what you think the error is
THE ROUTE
// HACK: CURL call
Route::get('/ajaxa', [
'uses' => '\Skylearn\Http\controllers\CurlController@curl',
'as' => 'ajaxa.index',
'middleware' => ['auth'],
]);
THE CONTROLLER
class CurlController extends controller
{
public function curl()
{
$response = Curl::to('https://curl-url')
->get();
}
// REVIEW:// DO NOT REMOVE THE CLOSING TAGS BELOW
}
THE BLADE AS JUST HELLO WORLD I DON'T KNOW IF I SHOULD MAKE A CALL OR NOT
<p>hello world</p>
I really need curl in this project and i would love it if anyone can answer this... Thanks a lot.
Please or to participate in this conversation.