Release Notes

4.* Series


4.0.1

3.* Series


2.* Series


2.6.6

2.6.5

2.6.4

2.6.3

See: On Model LoadMaps

2.6.2

Previous Format:

// Pretend we got these vars from somewhere...
$currentPage = 0;
$itemsPerPage = 20;

// Let's fetch a paginated view of the articles this user has written:
$currentPageArticles = $user->articles(function($query, $args) {
  return $query->offset($args[0] * $args[1])
               ->limit($args[1]);
}, [$currentPage, $itemsPerPage]);

New Format:

// Pretend we got these vars from somewhere...
$currentPage = 0;
$itemsPerPage = 20;

// Let's fetch a paginated view of the articles this user has written:
$currentPageArticles = $user->articles(function($query, $page, $itemsPerPage) {
  return $query->offset($page * $itemsPerPage)
               ->limit($itemsPerPage);
}, [$currentPage, $itemsPerPage]);

2.6.1