Skip to content

next: paginated Eloquent response type narrowing - #249

Open
levikl wants to merge 4 commits into
laravel:nextfrom
levikl:paginated-eloquent-response-type-narrowing
Open

next: paginated Eloquent response type narrowing#249
levikl wants to merge 4 commits into
laravel:nextfrom
levikl:paginated-eloquent-response-type-narrowing

Conversation

@levikl

@levikl levikl commented May 8, 2026

Copy link
Copy Markdown

summary

when a controller returns Product::paginate(5) as an Inertia response prop to the frontend, wayfinder previously had no way to carry the model type through the paginator, so the typegen emitted data: Record<string, unknown> instead of data: App.Models.Product[]. once three upstream PRs (laravel/framework#60045 + laravel/surveyor#39 + laravel/ranger#34) are merged, the full pipeline works automatically.

this change adds end-to-end test coverage confirming it.

related

merge order

laravel/framework -> laravel/surveyor -> laravel/ranger -> this

@levikl
levikl force-pushed the paginated-eloquent-response-type-narrowing branch 2 times, most recently from 3092cfc to 29a5e2c Compare May 8, 2026 06:01
@levikl levikl changed the title Paginated eloquent response type narrowing next: paginated Eloquent response type narrowing May 8, 2026
@levikl
levikl force-pushed the paginated-eloquent-response-type-narrowing branch from 29a5e2c to 2454450 Compare May 8, 2026 06:22
@levikl
levikl force-pushed the paginated-eloquent-response-type-narrowing branch from b6dee3a to d02e4cb Compare May 8, 2026 22:59
@levikl
levikl force-pushed the paginated-eloquent-response-type-narrowing branch 4 times, most recently from 67a0208 to 540540b Compare May 12, 2026 23:41
@levikl
levikl force-pushed the paginated-eloquent-response-type-narrowing branch 3 times, most recently from 6391652 to 1b0723e Compare May 13, 2026 21:51
@levikl
levikl force-pushed the paginated-eloquent-response-type-narrowing branch 3 times, most recently from c359185 to d78c555 Compare May 13, 2026 22:06
@levikl
levikl force-pushed the paginated-eloquent-response-type-narrowing branch from d78c555 to bf205f1 Compare May 13, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant