Skip to content

v1.2.0

Compare
Choose a tag to compare
@kitar kitar released this 15 Dec 12:07
· 2 commits to master since this release
af6180a
  • Added a method to retrieve LastEvaluatedKey more simply and reliably. #40 (Thanks @raphaelcangucu !)

We can now use the collection's method to retrieve the LastEvaluatedKey without having to reference the metadata for each model. This update makes it easy to obtain the LastEvaluatedKey, even when the items included in the response are empty.

$products = ProductCatalog::limit(5)->scan();

// can do this
$products->getLastEvaluatedKey();

// instead of
$products->first()->meta()['LastEvaluatedKey'];

The traditional method will continue to be supported in v1.x. However, it might become deprecated in v2.x.