| Package Data | |
|---|---|
| Maintainer Username: | snetty |
| Maintainer Contact: | simon@mousepilot.co.uk (Simon Stevens) |
| Package Create Date: | 2016-02-12 |
| Package Last Update: | 2016-02-12 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-27 03:20:13 |
| Package Statistics | |
|---|---|
| Total Downloads: | 17 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 0 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
################################################################################ Laravel Calculated Columns ################################################################################
An simple way to add calculated columns to your eloquent models
composer require snetty/laravel-calculated-columns
Snetty\LaravelCalculatedColumns\CalculatedColumns; to your modelsprotected $calculated_columns = ['new_column_name' => '(SELECT "SOME SUB QUERY")'];
:user_id in your subqueries and it will be parsed in automatically. If no user is present, the whole subquery will return false