stancl/virtualcolumn
stancl/virtualcolumn adds database-like “virtual columns” to Eloquent models, letting you define computed attributes that can be queried, sorted, and indexed as if they were real fields. Useful for JSON data, derived values, and cleaner, faster queries.
Architecture fit: The package fits well within Laravel's Eloquent ORM for application-level computed attributes, ideal for presentation logic and simple derived values. However, it operates purely in PHP, not at the database level, making it unsuitable for query constraints (e.g., WHERE clauses) or joins. Best for read-only scenarios where database normalization is prioritized over SQL-level computation.
Integration feasibility: Straightforward via Composer; requires minimal code changes to define virtual columns in models. No schema migrations needed. However, low adoption (82 stars) suggests limited
How can I help you explore Laravel packages today?