signifly /
laravel-builder-macros
| 1 | <?php |
||
| 2 | |||
| 3 | use Illuminate\Database\Eloquent\Builder; |
||
| 4 | |||
| 5 | Builder::macro('addSubSelect', function ($column, $query) { |
||
| 6 | $this->defaultSelectAll(); |
||
|
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
Loading history...
|
|||
| 7 | |||
| 8 | return $this->selectSub($query->limit(1)->getQuery(), $column); |
||
| 9 | }); |
||
| 10 |