Skip to content

Commit 769542e

Browse files
Improve readme a lot
1 parent 0799471 commit 769542e

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,16 @@ Laravel Twillio API Integration
1111

1212
## Installation
1313

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+
1516
```bash
1617
composer require aloha/twilio
1718
```
18-
In Laravel 5, use 2.0.0 pre-release version:
19-
```bash
20-
composer require 'aloha/twilio:2.0.0-RC2'
21-
```
19+
2220
## Laravel integration
2321

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.
2524

2625
```php
2726
'Aloha\Twilio\Support\Laravel\ServiceProvider',
@@ -32,27 +31,33 @@ This will register two new artisan commands for you:
3231
- `twilio:sms`
3332
- `twilio:call`
3433

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:
3641

3742
```php
3843
'Twilio' => 'Aloha\Twilio\Support\Laravel\Facade',
3944
```
4045

41-
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`.
4247

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`.
4449

4550
#### Facade
4651

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`.
4853
One extra feature is that you can define which settings (and which sender phone number) to use:
4954

5055
```php
51-
Twilio::from('callcenter')->message($user->phone, $message);
56+
Twilio::from('call_center')->message($user->phone, $message);
5257
Twilio::from('board_room')->message($boss->phone, 'Hi there boss!');
5358
```
5459

55-
Define multiple entries in your `twilio` config to make use of this feature.
60+
Define multiple entries in your `twilio` [config file](src/config/config.php) to make use of this feature.
5661

5762
### Usage
5863

0 commit comments

Comments
 (0)