Skip to content

Commit 62f4fe0

Browse files
committed
Update the usage instructions in the README.
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
1 parent d69efc8 commit 62f4fe0

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

README.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,35 @@ project's `composer.json`.
2020

2121
## Usage
2222

23-
First you have to register the AWS Service Provider when bootstrap your Laravel application. You can either provide an
24-
array of configuration options…
23+
First you have to register the AWS Service Provider when bootstraping your Laravel application. Create a new `app/config/aws.php` configuration file with the following options.
24+
25+
```php
26+
return array(
27+
'key' => '<your-aws-access-key-id>',
28+
'secret' => '<your-aws-secret-access-key>',
29+
'region' => Region::US_WEST_2,
30+
);
31+
```
32+
33+
Now find the `providers` key in `app/config/app.php` and register the AWS Service Provider.
34+
35+
```php
36+
'providers' => array(
37+
38+
....
39+
40+
'Aws\Laravel\AwsServiceProvider',
41+
42+
)
43+
```
44+
45+
Or if you'd like to register the configuration options at runtime.
2546

2647
```php
2748
use Aws\Common\Enum\Region;
2849
use Aws\Laravel\AwsServiceProvider;
29-
use Illuminate\Foundation\Application;
30-
31-
$app = new Application();
32-
// ...
3350

34-
$app->register(new AwsServiceProvider($app), array(
51+
App::register(new AwsServiceProvider($app), array(
3552
'config' => array(
3653
'aws' => array(
3754
'key' => '<your-aws-access-key-id>',
@@ -46,7 +63,7 @@ $app->register(new AwsServiceProvider($app), array(
4663
details).
4764

4865
```php
49-
$app->register(new AwsServiceProvider($app), array('config' => array('aws' => '/path/to/aws/config/file.php')));
66+
App::register(new AwsServiceProvider($app), array('config' => array('aws' => '/path/to/aws/config/file.php')));
5067
```
5168

5269
Either way, the value of `$app['config']['aws']` is passed directly into `Aws\Common\Aws::factory()`.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy