Can't connect to algolia when using PHP

I work on a laravel project, and I want to use Algolia search .

I’m using Laravel 5.8 , PHP 7.3.2, MySQL 5.7 , also I tried to use Algolia with plain PHP gave me the same error .

The Scout.php file :

'driver' => env('SCOUT_DRIVER', 'algolia'),
'queue' => env('SCOUT_QUEUE', true),
'algolia' => [
        'id' => env('ALGOLIA_APP_ID', '9E6G9WZK8L'),
        'secret' => env('ALGOLIA_SECRET', '5b8782094775d3ac6d48e083b5653928'),
    ],

.env file :

ALGOLIA_APP_ID=9E6G9WZK8L
ALGOLIA_SECRET=5b8782094775d3ac6d48e083b5653928
SCOUT_QUEUE = true

I double checked the values I entered as AppID and AdminID, I should be able to connect just fine , but it always says Impossible to connect, please check your Algolia Application Id. , I can connect and update data just fine when using Node.JS

Hello!

Thank you for reaching out!
According to the documentation, you do not need to specify the algolia attribute in the scout.php file: https://www.algolia.com/doc/framework-integration/laravel/getting-started/installation/. Have you tried without it?

Also, you should not share your Admin API key in cleartext and publicly. Could you edit your message to remove it?

Let me know how it goes or if you have more questions.

Best,
Benjamin