LaravelResponseStrategy
ArchivedThese are the docs for ng-qubee 3.8. Read the 4.0 docs for @qubeejs/angular.
Defined in: src/lib/strategies/laravel-response.strategy.ts:28
Response strategy for the Laravel (pagination-only) driver
Parses flat Laravel pagination responses:
{ "data": [...], "current_page": 1, "total": 100, "per_page": 15, "from": 1, "to": 15, "next_page_url": "...", "prev_page_url": "...", "first_page_url": "...", "last_page": 7, "last_page_url": "..."}The traversal algorithm (flat response[options.X] lookups) is
inherited from AbstractFlatResponseStrategy; this class exists so
DriverEnum.LARAVEL resolves to a distinct identity at the DI layer
even though the parsing logic is shared with Spatie.
Extends
Section titled “Extends”AbstractFlatResponseStrategy
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LaravelResponseStrategy():
LaravelResponseStrategy
Returns
Section titled “Returns”LaravelResponseStrategy
Inherited from
Section titled “Inherited from”AbstractFlatResponseStrategy.constructor
Methods
Section titled “Methods”paginate()
Section titled “paginate()”paginate<
T>(response,options):PaginatedCollection<T>
Defined in: src/lib/strategies/abstract-flat-response.strategy.ts:35
Parse a flat-envelope pagination response into a PaginatedCollection
Type Parameters
Section titled “Type Parameters”T extends IPaginatedObject
Parameters
Section titled “Parameters”response
Section titled “response”Record<string, any>
The raw API response object
options
Section titled “options”The response key name configuration
Returns
Section titled “Returns”A typed PaginatedCollection instance
Inherited from
Section titled “Inherited from”AbstractFlatResponseStrategy.paginate