$this->collection, ]; } public function with(Request $request): array { return [ 'success' => true, 'meta' => [ 'pagination' => [ 'current_page' => $this->currentPage(), 'per_page' => $this->perPage(), 'total' => $this->total(), 'last_page' => $this->lastPage(), 'from' => $this->firstItem(), 'to' => $this->lastItem(), ], ], ]; } }