Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
🔖 Requiring non-beta 0.x.x release to avoid non-stable issues.
Browse files Browse the repository at this point in the history
🔧 Allowing `.env` for config.
  • Loading branch information
tjlytle committed Apr 19, 2017
1 parent d83ec4a commit d87dc79
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ Installation

To install the PHP client library using Composer:

composer require nexmo/client @beta
composer require nexmo/laravel 1.0.0-beta3
composer require nexmo/laravel

*Importaint note*: While the client library is in `beta`, requiring `nexmo/client` specifically avoids changing the
`minimum-stability` in your `composer.json`.

Alternatively, add these two lines to your composer require section:

"nexmo/client": "@beta",
"nexmo/laravel": "1.0.0-beta3"
"nexmo/laravel": "0.4.0"

Then add `Nexmo\Laravel\NexmoServiceProvider` to the `providers` array in your `config/app.php`:

Expand All @@ -37,7 +35,11 @@ You can use `artisan vendor:publish` to copy the distribution configuration file

php artisan vendor:publish

Then set either the `api_key` and `api_secret`, or the `api_key` and `signature_secret`.
Then update `config/nexmo.php` with your credentials. You can also update your `.env` file with the following:
```
NEXMO_KEY = my_api_key
NEXMO_SECRET = my_secret
```

Usage
-----
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"require": {
"illuminate/support": "^5.2",
"nexmo/client": "1.0.0-beta3"
"nexmo/client": "0.4.0"
},
"autoload": {
"psr-4": {
Expand Down
11 changes: 6 additions & 5 deletions config/nexmo.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@
|
*/

//'api_key' => 'API_KEY',
//'api_secret' => 'API_SECRET',
'api_key' => function_exists('env') ? env('NEXMO_KEY', '') : '',
'api_secret' => function_exists('env') ? env('NEXMO_SECRET', '') : '',

/*
|--------------------------------------------------------------------------
| Signature Secret
|--------------------------------------------------------------------------
|
| If you're using a signature secret, use this section.
| If you're using a signature secret, use this section. This can be used
| without an `api_secret` for some APIs, as well as with an `api_secret`
| for all APIs.
|
*/

//'api_key' => 'API_KEY',
//'signature_secret' => 'SECRET'
'signature_secret' => function_exists('env') ? env('NEXMO_SIGNATURE_SECRET', '') : '',

];

0 comments on commit d87dc79

Please sign in to comment.