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