app->bind(LengthAwarePaginator::class, function ($app, $options) { return new ApiPaginator($options['items'], $options['total'], $options['perPage'], $options['currentPage'], $options['options']); }); } }