access paginator object attribute in laravel

Solutions on MaxInterview for access paginator object attribute in laravel by the best coders in the world

showing results for - "access paginator object attribute in laravel"
Jan
11 Jan 2019
1$paginator = $this->items()->where('position', '=', null)->paginate(15);
2$paginator->getCollection()->transform(function ($value) {
3    // Your code here
4    return $value;
5});
Emma
27 Aug 2020
1$paginator = tap($this->items()->where('position', '=', null)->paginate(15),function($paginatedInstance){
2    return $paginatedInstance->getCollection()->transform(function ($value) {
3        return $value;
4    });
5});