You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
It seems there is a bug after this commit (https://github.com/BinarCode/laravel-restify/blob/e8e8c7bf89ba5cb2b091aa9b0d4fe71c5d065891/src/Repositories/RepositoryCollection.php)
"prev" and "next" have the same value.
https://github.com/BinarCode/laravel-restify/tree/7.x/src/Repositories)/RepositoryCollection.php
/**
* Get the pagination links for the response.
*
* @param array $paginated
* @return array
*/
public static function paginationLinks($paginated)
{
return [
'first' => $paginated['first_page_url'] ?? null,
'last' => $paginated['last_page_url'] ?? null,
'prev' => array_key_exists('prev_page_url', $paginated) ? $paginated['prev_page_url'] :
collect(collect($paginated['links'])->firstWhere('label', 'Previous'))->get('url')
?? null,
'next' => array_key_exists('prev_page_url', $paginated) ? $paginated['prev_page_url'] :
collect(collect($paginated['links'])->firstWhere('label', 'Previous'))->get('url')
?? null,
];
}
Beta Was this translation helpful? Give feedback.
All reactions