- What is railken/lara-eye and what problem does it solve?
- railken/lara-eye is a lightweight Laravel package that translates a structured query payload into constraints on Laravel's Query\Builder or Eloquent builder, so you can add user-driven filtering without building a bespoke query DSL. It is non-invasive: no schema changes, queues, or cache dependencies, and it only runs where you invoke it. Typical fits are admin grids, reporting APIs, and saved searches.
- How do I install railken/lara-eye in a Laravel application?
- Install it with Composer using the package name railken/lara-eye; it follows standard Laravel package conventions with a service provider and likely a publishable config file. The real setup work is configuration: deciding which columns and operators are allowed and how relations may be filtered. Documentation is thin, so expect to read the source to confirm exact usage, and run a dependency-resolution check before committing.
- Does railken/lara-eye support Laravel 10, 11, and PHP 8.2 or newer?
- That is not guaranteed. It is a 39-star package from the Laravel 5.x era with a single maintainer and low activity, so support for PHP 8.2+ and Laravel 10-11 is doubtful. Run composer why-not or a dependency-resolution spike first; if it pins old illuminate/* or Symfony versions, treat adoption as a fork-and-patch job.
- Is railken/lara-eye safe to use with user-supplied filter input?
- Only with strict allowlisting. A library that turns client-supplied structure into SQL predicates is an injection and information-disclosure surface if column names, operators, or relation paths are not constrained. Assume nothing is allowlisted by default until you verify it in the source. Wrap it behind an adapter and validate input before it reaches the library.
- How do I whitelist filterable columns and operators in lara-eye?
- The package is described as configurable, but its thin documentation means you should read the source to confirm whether allowlisting is built in or left entirely to you. In practice, plan to enforce an allowlist of column names, map each permitted operator to a safe SQL comparison, and reject unknown relation paths. That enforcement belongs in your own adapter layer rather than scattered across controllers.
- How does lara-eye handle nested and/or query trees and relation filters?
- Nested and/or trees and relation filtering are among the behaviors you must verify yourself, since there is no visible test suite. Depending on the implementation the library may emit subqueries, joins, or whereHas clauses, and the resulting query shape affects both correctness and cost. Test empty, contradictory, and deeply nested predicates in your own suite before shipping.
- Is there a test suite for railken/lara-eye, and what does it cover?
- No visible test suite is mentioned for the package, so you own the verification burden. Write tests that cover nested predicate trees, every operator you allow, relation filters, and malformed input. That suite also becomes your safety net if you later fork or replace the library.
- What are alternatives to railken/lara-eye for filtering Laravel queries?
- Common alternatives include spatie/laravel-query-builder, custom filter classes, or hand-rolled Eloquent scopes. Each offers a more actively maintained or fully controlled contract surface than a small Laravel 5.x-era package. If you like lara-eye's structured query idea, borrowing the design into your own translator interface is often the safer route.
- Is railken/lara-eye actively maintained, and should I fork or vendor it?
- Treat it as likely abandoned: one maintainer, low activity, and no clear compatibility statement for modern Laravel. Before adopting, confirm the maintainer responds to issues and that you are prepared to fork and vendor the code. For a production application on a current stack, a maintained fork or an alternative is usually the better bet.
- How should I structure my code so I can swap out railken/lara-eye later?
- Put it behind a FilterTranslator interface with a lara-eye-backed implementation from day one. Your public API accepts your own filter schema, and the adapter converts it into lara-eye's structured query, keeping the library an internal detail. That way migrating to spatie/laravel-query-builder or custom scopes is a contained change rather than a breaking change for API consumers.