Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I've this issue #57

Closed
devnaelson opened this issue Mar 16, 2020 · 3 comments
Closed

I've this issue #57

devnaelson opened this issue Mar 16, 2020 · 3 comments

Comments

@devnaelson
Copy link

devnaelson commented Mar 16, 2020

namespace Mini\Controller;

use Mini\Libs\Tools\Guard;
use Twilio\Rest\Client;

class HomeController
{
    public function __construct()
    {
        Guard::guard();
    }

    public function index()
    {

        $twilio = new Client(TWILIO_SID, TWILIO_TOKEN);

        $message = $twilio->messages
            ->create("whatsapp:+55650000", // to
                [
                    "from" => "whatsapp:+14155238886",
                    "body" => "Twilio Sandbox: ✅ Hello customer Naelson!",
                ]
            );

        print($message->sid);

        require APP . 'view/_templates/header.php';
        require APP . 'view/index.php';
        require APP . 'view/_templates/footer.php';
    }
}

Warning: Use of undefined constant CURLOPT_URL - assumed 'CURLOPT_URL' (this will throw an Error in a future version of PHP) in /var/www/html/crm-2wins/vendor/twilio/sdk/src/Twilio/Http/CurlClient.php on line 115

If i put it in public index.php will disappear errors

@devnaelson
Copy link
Author

devnaelson commented Mar 16, 2020

Edit: after long time
I did solve it after that i put on host. Why it going happened?

@sa-tasche
Copy link

This is not a bug in Mini3.
Do you activated cURL extension?

@devnaelson
Copy link
Author

This is not a bug in Mini3.
Do you activated cURL extension?

Hi, i go parse it, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants