When we have no ENV variables setted (to disable whatsapp messages), the file WhatsAppCloudApiApp.php do an error in line 38 telling:
Cannot assign null to property Netflie\WhatsAppCloudApi\WhatsAppCloudApiApp::$from_phone_number_id of type string
But, the 'null' is set in your own code!!!
My services.php tried so hard to set empty string, but it´s not solved this issue:
'whatsapp' => [
'from-phone-number-id' => env('WHATSAPP_ID', '')??'',
'token' => env('WHATSAPP_TOKEN', '')??'',
],
I need an easy way to enable/disable WhatsApp messages in project. The fastest way is #comment lines in env file. But it´s not work because we got this error.
When we have no ENV variables setted (to disable whatsapp messages), the file WhatsAppCloudApiApp.php do an error in line 38 telling:
Cannot assign null to property Netflie\WhatsAppCloudApi\WhatsAppCloudApiApp::$from_phone_number_id of type string
But, the 'null' is set in your own code!!!
My services.php tried so hard to set empty string, but it´s not solved this issue: 'whatsapp' => [ 'from-phone-number-id' => env('WHATSAPP_ID', '')??'', 'token' => env('WHATSAPP_TOKEN', '')??'', ],
I need an easy way to enable/disable WhatsApp messages in project. The fastest way is #comment lines in env file. But it´s not work because we got this error.