âť“ Frequently Asked Questions (FAQs)
1. Why use Tuner instead of Laravel API Resource?
Tuner doesn’t replace Laravel’s API Resources — it complements them. While Laravel focuses on how developers structure and shape API responses, Tuner is built from the consumer’s perspective. It gives API consumers the flexibility to tweak responses directly — selecting columns, filtering, sorting, and more — without requiring backend changes.
2. Is Tuner compatible with Laravel Latest?
Yes. Tuner is fully compatible with:
- Laravel versions: 10, 11, and 12
- PHP versions: 8.0 up to 8.3
It follows Laravel’s latest conventions and integrates cleanly into modern Laravel projects.
3. Is Tuner prone to SQL Injection?
It uses Laravel’s Query Builder and Eloquent ORM under the hood, which automatically applies parameter binding to all queries. This ensures that any user-supplied values — such as filters, search terms, or sort parameters — are safely escaped and do not directly affect raw SQL.
Tuner also sanitizes operators and validates query syntax internally, adding an extra layer of protection.
As always, follow Laravel best practices and avoid exposing raw database input to untrusted users.
4. Does Tuner support Eloquent relationships?
Absolutely. Tuner was built with Eloquent in mind. It fully supports all relationship types:
- HasOne
- HasMany
- BelongsTo
- BelongsToMany
These relationships can be expanded, filtered, searched, projected, and more — directly from the query string.
5. Can I use Tuner in existing Laravel APIs?
Yes, you can integrate Tuner into an existing API with minimal effort.
As long as your models follow standard Eloquent practices, you can immediately start using features like filtering, projection, and expansion in your current endpoints without rewriting your logic.
6. Is Tuner configurable?
Yes, it’s designed with flexibility in mind.
You can:
- Customize the query parameter names if you prefer different conventions.
- Enable or disable specific features.
A configuration file is published where you can fine-tune how Tuner behaves in your application.
7. Do you have an API collection to easily explore the features?
Yes, I provide a Bruno collection to help you explore and test the features out of the box.
If you’re using a different API client like Postman or Insomnia, you can easily convert the Bruno collection using available tools or export options.