7481dab012
* Remove extraneous data from API response; force API to en * Style fixes * Remove * Fix the meta block * Style fixes
17 lines
485 B
PHP
17 lines
485 B
PHP
<?php
|
|
|
|
namespace App\Support\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
|
|
use Illuminate\Pagination\AbstractPaginator;
|
|
|
|
class CustomAnonymousResourceCollection extends AnonymousResourceCollection
|
|
{
|
|
public function toResponse($request)
|
|
{
|
|
return $this->resource instanceof AbstractPaginator
|
|
? (new CustomPaginatedResourceResponse($this))->toResponse($request)
|
|
: parent::toResponse($request);
|
|
}
|
|
}
|