CURL is enabled in PHP but disabled in Laravel
In your error message PHP tries to resolve the curl_init
function within the App\Http\Controllers
namespace. If the underlying issue is not related to the PHP Warning you later pasted, the curl functions should work if you prefix them with backslash, like \curl_init
.
This way you're telling PHP that the function resides within the top level namespace, not within App\Http\Controllers
I was running Laravel with:
php artisan serve --host 0.0.0.0
but when I changed it to :
php artisan serve --host my_private_IP
it's working now.