Skip to content

Commit 9554d45

Browse files
committed
Update README.md
1 parent 0dab354 commit 9554d45

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ Install the package via Composer:
7272
$ composer require kitar/laravel-dynamodb
7373
```
7474

75-
### Laravel
76-
77-
> We only support Laravel 6+.
75+
### Laravel (6.x, 7.x, 8.x)
7876

7977
Add dynamodb configs to config/database.php:
8078

@@ -85,10 +83,10 @@ Add dynamodb configs to config/database.php:
8583
'driver' => 'dynamodb',
8684
'key' => env('AWS_ACCESS_KEY_ID'),
8785
'secret' => env('AWS_SECRET_ACCESS_KEY'),
88-
'token' => env('AWS_SESSION_TOKEN'),
8986
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
90-
'endpoint' => env('DYNAMODB_ENDPOINT'),
91-
'prefix' => 'table_prefix_',
87+
'token' => env('AWS_SESSION_TOKEN', null),
88+
'endpoint' => env('DYNAMODB_ENDPOINT', null),
89+
'prefix' => '', // table prefix
9290
],
9391

9492
...
@@ -102,9 +100,12 @@ For usage outside Laravel, you can create the connection manually and start quer
102100

103101
```php
104102
$connection = new Kitar\Dynamodb\Connection([
105-
'region' => env('AWS_DEFAULT_REGION'),
106-
'access_key' => env('AWS_ACCESS_KEY_ID'),
107-
'secret_key' => env('AWS_SECRET_ACCESS_KEY')
103+
'key' => env('AWS_ACCESS_KEY_ID'),
104+
'secret' => env('AWS_SECRET_ACCESS_KEY'),
105+
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
106+
'token' => env('AWS_SESSION_TOKEN', null),
107+
'endpoint' => env('DYNAMODB_ENDPOINT', null),
108+
'prefix' => '', // table prefix
108109
]);
109110

110111
$connection->table('your-table')->...
@@ -393,9 +394,12 @@ Or even outside Laravel.
393394

394395
```php
395396
$connection = new Kitar\Dynamodb\Connection([
396-
'region' => env('AWS_DEFAULT_REGION'),
397-
'access_key' => env('AWS_ACCESS_KEY_ID'),
398-
'secret_key' => env('AWS_SECRET_ACCESS_KEY')
397+
'key' => env('AWS_ACCESS_KEY_ID'),
398+
'secret' => env('AWS_SECRET_ACCESS_KEY'),
399+
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
400+
'token' => env('AWS_SESSION_TOKEN', null),
401+
'endpoint' => env('DYNAMODB_ENDPOINT', null),
402+
'prefix' => '', // table prefix
399403
]);
400404

401405
$result = $connection->table('Thread')->scan();

0 commit comments

Comments
 (0)