?with=users,posts,comments).?with=author,tags).with() logic in controllers).Pimpable or building a custom solution).spatie/laravel-query-builder).with() clauses) beyond simple string matching.with parameters manually).For Executives:
"This package lets our backend dynamically serve nested data based on client requests—like a ‘choose-your-own-adventure’ for API responses. For example, an admin could fetch a Post with its author and comments by simply appending ?with=author,comments to the URL. This reduces frontend work, cuts unnecessary data transfer, and future-proofs our APIs for third-party integrations. It’s a low-risk, high-reward way to add flexibility without reinventing the wheel."
For Engineering:
"The Withable trait lets us declaratively expose eager-loading via query params, cutting boilerplate in controllers. For a model like Post, we define allowed relations (e.g., ['author', 'tags']), and the package handles the rest. It’s lightweight, Laravel-native, and integrates seamlessly with existing Eloquent queries. Tradeoffs:
with params).Pimpable if you also need sorting/filtering.Example use case: Replace Post::with(['author', 'comments'])->get() with Post::with(Request::input('with'))->get() in your API routes."
How can I help you explore Laravel packages today?