Skip to content

Add PaginatedResult Interface #99

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>;
}>();

Replicating from: laravel/vue-starter-kit#98

Adding PaginatedResult interface
@tnylea
Copy link
Contributor

tnylea commented Apr 15, 2025

Rock'n 🤘 Thanks dude!

@tnylea tnylea added the Approved Approved for Merge label Apr 15, 2025
@Barbapapazes
Copy link

Hey! I really liked your idea, so I went ahead and built a small JavaScript package to make it easy to share common Laravel types across projects: https://github.com/barbapapazes/laravel-types.

It’s something I’ve had in mind for a few weeks, and seeing your PR was the push I needed to finally make it happen!

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.

3 participants