v1.2.0
- 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
.