Skip to content

Commit 0c67856

Browse files
authored
Merge pull request #165 from andrewminion-luminfire/documentation
add a Lumen example
2 parents fdecc2c + 0da8724 commit 0c67856

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ return [
9595
],
9696
'region' => env('AWS_REGION', 'us-east-1'),
9797
'version' => 'latest',
98-
9998
// You can override settings for specific services
10099
'Ses' => [
101100
'region' => 'us-east-1',
@@ -137,6 +136,17 @@ $s3->putObject(array(
137136
));
138137
```
139138

139+
To use in Lumen, you need to retrieve it from the service container a bit differently:
140+
141+
```php
142+
$s3 = app('aws')->createClient('s3');
143+
$s3->putObject(array(
144+
'Bucket' => 'YOUR_BUCKET',
145+
'Key' => 'YOUR_OBJECT_KEY',
146+
'SourceFile' => '/the/path/to/the/file/you/are/uploading.ext',
147+
));
148+
```
149+
140150
## Getting Help
141151

142152
Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.

0 commit comments

Comments
 (0)