phpvms/app/Support/Resources/CustomPaginatedResourceResponse.php
2021-06-10 08:46:56 -04:00

36 lines
722 B
PHP

<?php
namespace App\Support\Resources;
use Illuminate\Http\Resources\Json\PaginatedResourceResponse;
use Illuminate\Support\Arr;
class CustomPaginatedResourceResponse extends PaginatedResourceResponse
{
protected function paginationLinks($paginated)
{
return [];
}
protected function meta($paginated)
{
$arr = Arr::except($paginated, [
'data',
'first_page_url',
'last_page_url',
'prev_page_url',
'next_page_url',
'links',
]);
$arr['links'] = [
'first' => '',
'last' => '',
'next' => '',
'prev' => ','
];
return $arr;
}
}