foxbytehq/laravel-inertia-dataproviders
Laravel Inertia Data Providers lets you organize page props into reusable provider classes, keeping Inertia responses clean and predictable. Define and compose structured data from Laravel controllers to your frontend with less boilerplate.
Architecture fit
laravel-inertia-dataproviders sits in the prop-construction layer of an Inertia app — between Eloquent/domain services and the Inertia::render() call. It formalises what most teams hand-roll as controller methods or view-composers: a named, testable class that returns the array of props for a page. That is a good fit for applications where controllers have accumulated 100+ lines of array shaping, where the same prop set is needed by multiple entry points (web page, modal refresh, partial reload), or where frontend/backend prop contracts drift. It is not a fit for small apps or teams without an existing Inertia commitment — it adds an indirection layer that only pays off at scale.
Integration feasibility Low ceremony: Composer install, optionally publish config, define provider classes, reference them from controllers. No database changes, no queue workers, no external services. The practical gate is not the package's API but its framework constraint.
Technical risk
composer.json constraints rather than inferring from the changelog.inertiajs/inertia-laravel, the testing helpers, and your auth/permission packages are all Laravel 13-ready at the same time. The package being early is not the same as the stack being ready.Key questions
illuminate/* and PHP constraints, and does v4 retain any Laravel 12 support window?Stack fit
Laravel 13 + Inertia v2 + Vue/React/Svelte. Works cleanly with the standard HandleInertiaRequests middleware and resource controllers. Fits a conventional modular monolith; no opinion on DDD or hexagonal layering, so it composes with either.
Migration path The changelog describes a framework-support cutover, not an API rewrite — so v3.3.0 → v4.0.0 should be mostly mechanical if we are already on Laravel 13. Order of operations matters: upgrade Laravel first, verify the Inertia adapter and test suite, then bump this package. Attempting the package bump first will simply fail dependency resolution.
If we are on Laravel 11/12, pin to ^3.3 and treat v4 as a forward-looking item, not a task. Note that pinning a major behind current means accepting that 3.3.x likely stops receiving fixes.
Compatibility
Validate the full matrix before committing: PHP version floor, inertiajs/inertia-laravel constraint, test tooling (Pest/PHPUnit version), and any static analysis config. Confirm our CI matrix covers the target Laravel version — a package that passes its own tests on Laravel 13 does not guarantee our application's test suite does.
Sequencing
Maintenance Expect roughly one forced major upgrade per year, tracking Laravel's annual release cadence. That is a predictable, budgetable cost — but it is a cost, and it lands in the same window as every other Laravel 13-dependent package. Track it in the same dependency-review queue as the framework itself.
Support Community OSS, no SLA, no commercial backing. Acceptable for a non-critical presentation-layer concern that can be replaced with plain arrays in an afternoon; unacceptable as a load-bearing dependency for anything with uptime commitments. Mitigate by keeping provider classes thin and free of business logic, so the escape hatch stays cheap.
Scaling Runtime overhead is negligible — this is array assembly, not I/O. The real scaling concern is what providers do: a provider is an easy place to hide an N+1 query or an expensive aggregate. Enforce a rule that providers orchestrate already-loaded data or explicitly eager-load; do not let them become a second service layer. Cache expensive prop computations upstream of the provider, not inside it.
Failure modes
Ramp-up The concept is learnable in an hour by anyone fluent in Laravel and Inertia; the API surface is small. Realistic ramp: half a day for a senior developer to be productive, roughly a sprint for a team to internalise the convention and stop writing ad-hoc prop arrays alongside it. The added test suite in v4 is a meaningful onboarding asset — reading the tests is the fastest way to learn the intended usage. Budget review time for the first two PRs per developer to catch anti-patterns early.
How can I help you explore Laravel packages today?