Skip to content

Add PaginatedResult Interface #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JustSteveKing
Copy link

Adding a PaginatedResult interface with generics to allow for better typed pagination between Laravel and Inertia/Vue.

An example implementation for you Inertia page, passing the generic type you expect to paginate through to the paginated result

const props = defineProps<{
  projects: PaginatedResult<Project>;
}>();

Adding a `PaginatedResult` interface with generics to allow for better typed pagination between Laravel and Inertia/Vue
@JustSteveKing
Copy link
Author

@tnylea let me know if this is ok or you want the interface broken up a little more 🤗

@tnylea
Copy link
Contributor

tnylea commented Apr 14, 2025

Hey @JustSteveKing, thanks for the PR. It looks great.

Could you also open a PR for this PaginatedResult type in the React starter kit? I'm sure people who use the React version could use this as well.

@tnylea tnylea added the Approved Approved for merge label Apr 14, 2025
@JustSteveKing
Copy link
Author

Sure thing @tnylea

@JustSteveKing
Copy link
Author

React PR: laravel/react-starter-kit#99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Approved for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants