You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-12Lines changed: 17 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,17 +11,16 @@ Laravel Twillio API Integration
11
11
12
12
## Installation
13
13
14
-
Begin by installing this package through Composer. In Laravel 4, run this command from the Terminal:
14
+
Begin by installing this package through Composer. Run this command from the Terminal:
15
+
15
16
```bash
16
17
composer require aloha/twilio
17
18
```
18
-
In Laravel 5, use 2.0.0 pre-release version:
19
-
```bash
20
-
composer require 'aloha/twilio:2.0.0-RC2'
21
-
```
19
+
22
20
## Laravel integration
23
21
24
-
To wire this up in your Laravel project, wether it's built in Laravel 4 or 5, you need to add the service provider. Open `app.php`, and add a new item to the providers array.
22
+
To wire this up in your Laravel project, wether it's built in Laravel 4 or 5, you need to add the service provider.
23
+
Open `app.php`, and add a new item to the providers array.
25
24
26
25
```php
27
26
'Aloha\Twilio\Support\Laravel\ServiceProvider',
@@ -32,27 +31,33 @@ This will register two new artisan commands for you:
32
31
-`twilio:sms`
33
32
-`twilio:call`
34
33
35
-
Then, add a Facade for more convenient usage. In your `app.php` config file add the following line to the `aliases` array:
34
+
And make these objects resolvable from the IoC container:
35
+
36
+
-`Aloha\Twilio\Manager` (aliased as `twilio`)
37
+
-`Aloha\Twilio\TwilioInterface` (resolves a `Twilio` object, the default connection object created by the `Manager`).
38
+
39
+
There's a Facade class available for you, if you like. In your `app.php` config file add the following
40
+
line to the `aliases` array if you want to use a short class name:
In Laravel 4 you need to publish the default config file to `app/config/packages/aloha/twilio/config.php` with the artisan command `config:publish aloha/twilio`.
46
+
In Laravel 4 you can publish the default config file to `app/config/packages/aloha/twilio/config.php` with the artisan command `config:publish aloha/twilio`.
42
47
43
-
In Laravel 5 you need to publish the default config file to `config/twilio.php` with the artisan command `vendor:publish`.
48
+
In Laravel 5 you can publish the default config file to `config/twilio.php` with the artisan command `vendor:publish`.
44
49
45
50
#### Facade
46
51
47
-
The facade now has the exact same methods as the `Aloha\Twilio\TwilioInterface`.
52
+
The facade has the exact same methods as the `Aloha\Twilio\TwilioInterface`.
48
53
One extra feature is that you can define which settings (and which sender phone number) to use:
0 commit comments