mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 13:38:20 +01:00
Use Collection on API Paginator presenter
This allows to decorate all model's attributes inside the Collection
This commit is contained in:
parent
22204811c2
commit
b6fbe53b28
@ -167,7 +167,7 @@ abstract class AbstractApiController extends Controller
|
||||
$items = $items->sortBy($sortBy, SORT_REGULAR, $direction);
|
||||
}
|
||||
|
||||
return $this->setMetaData($pagination)->setData(AutoPresenter::decorate($items->values()->all()))->respond();
|
||||
return $this->setMetaData($pagination)->setData(AutoPresenter::decorate($items->values()))->respond();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user