Vonage / vonage-php-code-snippets

PHP code examples for using Vonage APIs
Apache License 2.0
29 stars 57 forks source link

Updated receive sms with slim #64

Closed GregHolmes closed 3 years ago

GregHolmes commented 3 years ago

I'm working my way through building Youtube XwithYs, this is the next one in my sights. I've updated the Receive SMS with Slim example to use a newer version of Slim because the differences in how the framework is used vary quite a bit.

I've also updated the logged output to rather than output the class fields, instead follow: https://github.com/Nexmo/code-snippet-specs/blob/master/sms/receive-sms.md

Which is to output the msisdn and text: eg

console.log(`from: ${params.msisdn}, message: ${params.message}`)

For PHP becomes:

error_log('From: ' . $sms->getMsisdn() . ' message: ' . $sms->getText());

GregHolmes commented 3 years ago

Thanks @dragonmantank , but it doesn't look like there is a composer.lock, and .gitignore contains composer.lock

dragonmantank commented 3 years ago

Merged!