Reputation: 350
but when I go to composer.json, the library ain't there showing.
I just wrote this:
php composer.phar require twilio/sdk
and I could see the typical running of dependencies and versions being installed and I even updated it to make sure it had actually installed it (otherwise it would complain nothing ain't there) but
when I went to routes and wrote this:
Route::match(array('GET', 'POST'), '/sms', function()
{
$twiml = new Services_Twilio_Twiml();
$twiml->say('Hello - sorry to ring in the WC', array('voice' => 'alice'));
$response = Response::make($twiml, 200);
$response->header('Content-Type', 'text/xml');
return $response;
});
it says it can't find the class, so, either twilio is hiding from every predator or I don't know what.
Question:
So, eventually I would need to know the exact syntax to be added to the config app service providers but I can only find syntax for other libraries related to twilio which are not the official libraries for laravel and I d rather use twilio/sdk and not any other.
What would be the syntax for both the service provider and the alias façade?
Upvotes: 0
Views: 258
Reputation: 1863
Let's se.... And do you know what's the namespace? Because all you need in that case is at the top of the file:
use Path\To\Namespace\Class
and that's all... Or...
$twiml = New Path\To\Namespace\Services_Twilio_Twiml();
Upvotes: 1