laravel-onesignal icon indicating copy to clipboard operation
laravel-onesignal copied to clipboard

Undefined index: guzzle_client_timeout in sending from a console command

Open ChrAus opened this issue 2 years ago • 0 comments

Hi there,

I recently udpated the version of this library since I updated to laravel 8. I am sending to multiple devices using this function:

public function sendViaOneSignal($devicelist)
    {
        if (empty($devicelist)) {
            return true;
        }
        OneSignal::sendNotificationCustom([
            'contents' => [
                'en' => $this->data['pushmessage'],
            ],
            'headings' => [
                'en' => $this->data['subject'],
            ],
            'include_player_ids' => $devicelist,
        ]);

        return true;
    }

But after updating I receive the following error:

Undefined index: guzzle_client_timeout in \vendor\berkayk\onesignal-laravel\src\OneSignalServiceProvider.php on line 39

I added this line to my config file:

'guzzle_client_timeout' => env('ONESIGNAL_GUZZLE_CLIENT_TIMEOUT', 0),

Any ideas?

ChrAus avatar Nov 04 '22 17:11 ChrAus