Update ApiV1Controller, fix link header pagination
This commit is contained in:
parent
737f3da5a4
commit
0a9654e3b8
|
@ -1254,7 +1254,7 @@ class ApiV1Controller extends Controller
|
||||||
|
|
||||||
$baseUrl = config('app.url') . '/api/v1/notifications?';
|
$baseUrl = config('app.url') . '/api/v1/notifications?';
|
||||||
|
|
||||||
$link = "<{$baseUrl}max_id={$maxId}>; rel='next',<{$baseUrl}min_id={$minId}>; rel='prev'";
|
$link = '<'.$baseUrl.'max_id='.$maxId.'>; rel="next",<'.$baseUrl.'min_id='.$minId.'>; rel="prev"';
|
||||||
|
|
||||||
return response()->json($res)->withHeaders([
|
return response()->json($res)->withHeaders([
|
||||||
'Link' => $link,
|
'Link' => $link,
|
||||||
|
|
Loading…
Reference in a new issue