Defining many controllers for a model for different API endpoints each requiring its own subset of fields of the model thus ensuring that DB querying is optimized and that no bandwidth is wasted serving up unnecessary data that is not to be rendered

This page summarizes the projects mentioned and recommended in the original post on /r/laravel

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • flexible-presenter

    Easily define just the right data for your InertiaJS views (or anywhere else you want to, uh, flexibly present).

  • I don’t know enough about writing APIs to tell you if this would work, but we use https://github.com/AdditionApps/flexible-presenter very successfully. It has ‘preset’s which are subsets of the available fields - so where I’m displaying just user name and need their id for routing i can call the presenter with ->preset(‘listing’) to only get those fields.

  • apollo

    🚀 Apollo/GraphQL integration for VueJS (by vuejs)

  • Cool, if you do go with graphql, I'd recommend vue-apollo on the client end. Combine with @vue/apollo-composable and graphql-codegen and it feels like sorcery.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • json-api

    A specification for building JSON APIs

  • You can either do the "per-view" style you mentioned, or you can let the client tell the API what it wants. I'd check out the JSON:API spec for inspiration.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts