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
+20-9Lines changed: 20 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,12 @@ project's `composer.json`.
20
20
21
21
## Usage
22
22
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.
23
+
To use the AWS Service Provider, you must register the provider when bootstrapping your Laravel application. There are
24
+
essentially two ways to do this.
25
+
26
+
### 1. Use Laravel Configuration
27
+
28
+
Create a new `app/config/aws.php` configuration file with the following options:
24
29
25
30
```php
26
31
return array(
@@ -30,7 +35,7 @@ return array(
30
35
);
31
36
```
32
37
33
-
Now find the `providers` key in `app/config/app.php` and register the AWS Service Provider.
38
+
Find the `providers` key in `app/config/app.php` and register the AWS Service Provider.
34
39
35
40
```php
36
41
'providers' => array(
@@ -42,17 +47,21 @@ Now find the `providers` key in `app/config/app.php` and register the AWS Servic
42
47
)
43
48
```
44
49
45
-
Or if you'd like to register the configuration options at runtime.
50
+
### 2. Manual Instantiation
51
+
52
+
You can also register the provider and configuration options at runtime. This could be done in your global bootstrapping
53
+
process in `app/start/global.php`.
46
54
47
55
```php
48
56
use Aws\Common\Enum\Region;
49
57
use Aws\Laravel\AwsServiceProvider;
50
58
use Illuminate\Foundation\Application;
51
59
52
-
// Instantiate a new application. This is done by the Laravel framework and the instance is available
53
-
// in app/start/global.php for you to use.
60
+
// Instantiate a new application. This is normally done by the Laravel framework and the instance is available in
61
+
// `app/start/global.php` for you to use.
54
62
$app = new Application;
55
63
64
+
// Register the AWS service provider and provide your configuration
0 commit comments